VirtualBox

Changeset 65033 in vbox


Ignore:
Timestamp:
Dec 29, 2016 11:10:03 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
112528
Message:

testmanager/schedulerbase.py: More fixing on the problem of getting stuck doing nothing when a scheduling group is out of new builds to test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/core/schedulerbase.py

    r65031 r65033  
    13011301              and oSchedGroup.idSchedGroup not in dIgnoreSchedGroupIds:
    13021302                return (oSchedGroup, 0);
     1303            iWorkItem = 0;
    13031304
    13041305        elif len(oTestBoxDataEx.aoInSchedGroups) > 0:
     
    13401341                if aoFlat[iWorkItem].idSchedGroup not in dIgnoreSchedGroupIds:
    13411342                    return (aoFlat[iWorkItem], iWorkItem);
     1343        else:
     1344            iWorkItem = 0;
    13421345
    13431346        # No active group.
    1344         return (None, 0);
     1347        return (None, iWorkItem);
    13451348
    13461349    @staticmethod
     
    13811384
    13821385                # We may have to skip scheduling groups that are out of work (e.g. 'No build').
     1386                iInitialWorkItem     = iWorkItem;
    13831387                dIgnoreSchedGroupIds = [];
    13841388                while True:
     
    13961400                        oDb.commit();
    13971401                        return dResponse;
     1402
     1403                    # Check out the next work item?
     1404                    if oScheduler.getElapsedSecs() > config.g_kcSecMaxNewTask:
     1405                        break;
    13981406                    dIgnoreSchedGroupIds[oSchedGroup.idSchedGroup] = oSchedGroup;
     1407
     1408                # No luck, but best if we update the work item if we've made progress.
     1409                # Note! In case of a config.g_kcSecMaxNewTask timeout, this may accidentally skip
     1410                #       a work item with actually work to do.  But that's a small price to pay.
     1411                if iWorkItem != iInitialWorkItem:
     1412                    oTBStatusLogic.updateWorkItem(oTestBoxDataEx.idTestBox, iWorkItem);
     1413                    oDb.commit();
     1414                    return None;
    13991415        except:
    14001416            oDb.rollback();
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