Changeset 56802 in vbox for trunk/src/VBox
- Timestamp:
- Jul 3, 2015 11:14:09 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/core/schedulerbase.py
r56295 r56802 612 612 aoItems = self._recreateQueueItems(oData); 613 613 self.msgDebug('len(aoItems)=%s' % (len(aoItems),)); 614 for i in range(len(aoItems)):615 self.msgDebug('aoItems[%2d]=%s' % (i, aoItems[i]));614 #for i in range(len(aoItems)): 615 # self.msgDebug('aoItems[%2d]=%s' % (i, aoItems[i])); 616 616 if len(aoItems) > 0: 617 617 self._oDb.execute('SELECT offQueue FROM SchedQueues WHERE idSchedGroup = %s ORDER BY idItem LIMIT 1' … … 633 633 self._recreateQueueCancelGatherings(); 634 634 self._oDb.execute('DELETE FROM SchedQueues WHERE idSchedGroup = %s\n', (self._oSchedGrpData.idSchedGroup,)); 635 for oItem in aoItems: 636 self._oDb.execute('INSERT INTO SchedQueues (\n' 635 self._oDb.insertList('INSERT INTO SchedQueues (\n' 637 636 ' idSchedGroup,\n' 638 637 ' offQueue,\n' … … 641 640 ' aidTestGroupPreReqs,\n' 642 641 ' bmHourlySchedule,\n' 643 ' cMissingGangMembers )\n' 644 'VALUES ( %s, %s, %s, %s, %s, %s, %s )\n' 645 , ( oItem.idSchedGroup, 646 oItem.offQueue, 647 oItem.idGenTestCaseArgs, 648 oItem.idTestGroup, 649 oItem.aidTestGroupPreReqs if len(oItem.aidTestGroupPreReqs) > 0 else None, 650 oItem.bmHourlySchedule, 651 oItem.cMissingGangMembers 652 )); 642 ' cMissingGangMembers )\n', 643 aoItems, self._formatItemForInsert); 653 644 return (aoErrors, self._asMessages); 645 646 def _formatItemForInsert(self, oItem): 647 """ 648 Used by recreateQueueWorker together with TMDatabaseConnect::insertList 649 """ 650 return self._oDb.formatBindArgs('(%s,%s,%s,%s,%s,%s,%s)' 651 , ( oItem.idSchedGroup, 652 oItem.offQueue, 653 oItem.idGenTestCaseArgs, 654 oItem.idTestGroup, 655 oItem.aidTestGroupPreReqs if len(oItem.aidTestGroupPreReqs) > 0 else None, 656 oItem.bmHourlySchedule, 657 oItem.cMissingGangMembers 658 )); 654 659 655 660 @staticmethod … … 664 669 Raises exception database error. 665 670 """ 671 672 aoExtraMsgs = []; 673 if oDb.debugIsExplainEnabled(): 674 aoExtraMsgs += ['Warning! Disabling SQL explain to avoid deadlocking against locked tables.']; 675 oDb.debugDisableExplain(); 676 666 677 aoErrors = []; 667 678 asMessages = []; … … 696 707 raise; 697 708 698 return (aoErrors, a sMessages);709 return (aoErrors, aoExtraMsgs + asMessages); 699 710 700 711
Note:
See TracChangeset
for help on using the changeset viewer.