VirtualBox

Ignore:
Timestamp:
Nov 20, 2020 3:35:35 PM (4 years ago)
Author:
vboxsync
Message:

testmanager/status.py: Fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/cgi/status.py

    r86936 r86937  
    312312        #
    313313        # Get the data.
    314         # bird: I changed these to join on idGenTestBox and skipping the tsExpire condition.
     314        # bird: I changed these to join on idGenTestBox.
    315315        # @todo The query isn't very efficient as postgresql probably will repeat the
    316316        #       subselect in column 5 for each result row.
     
    325325        TestSets.tsCreated,
    326326        TestBoxesWithStrings.sOS,
    327         (   SELECT  STRING_AGG(SchedGroups.sName, ',')
    328             FROM    SchedGroups
    329             INNER JOIN TestBoxesInSchedGroups
    330                     ON TestBoxesInSchedGroups.idSchedGroup = SchedGroups.idSchedGroup
    331                    AND TestBoxesInSchedGroups.idTestBox    = TestBoxesWithStrings.idTestBox
    332             WHERE   TestBoxesInSchedGroups.tsExpire = 'infinity'::TIMESTAMP
    333                 AND SchedGroups.tsExpire            = 'infinity'::TIMESTAMP
    334         ) AS SchedGroupName
    335 FROM    TestBoxesWithStrings
     327        SchedGroupNames.sSchedGroupNames
     328FROM    TestBoxesWithStrings,
     329        (SELECT TestBoxesInSchedGroups.idTestBox AS idTestBox,
     330                STRING_AGG(SchedGroups.sName, ',') AS sSchedGroupNames
     331         FROM   TestBoxesInSchedGroups
     332         INNER JOIN SchedGroups
     333                 ON SchedGroups.idSchedGroup = TestBoxesInSchedGroups.idSchedGroup
     334         WHERE  TestBoxesInSchedGroups.tsExpire = 'infinity'::TIMESTAMP
     335            AND SchedGroups.tsExpire            = 'infinity'::TIMESTAMP
     336         GROUP BY TestBoxesInSchedGroups.idTestBox)
     337        AS SchedGroupNames
    336338LEFT OUTER JOIN TestSets
    337339             ON TestSets.idGenTestBox = TestBoxesWithStrings.idGenTestBox
    338340            AND (   TestSets.tsCreated > (CURRENT_TIMESTAMP - '%s hours'::interval)
    339341                 OR TestSets.tsDone IS NULL)
     342WHERE   TestBoxesWithStrings.tsExpire = 'infinity'::TIMESTAMP
     343  AND   SchedGroupNames.idTestBox = TestBoxesWithStrings.idTestBox
    340344''', (cHoursBack,));
    341345
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette