Index: trunk/ippToPsps/jython/queue.py
===================================================================
--- trunk/ippToPsps/jython/queue.py	(revision 33673)
+++ trunk/ippToPsps/jython/queue.py	(revision 33674)
@@ -13,4 +13,5 @@
 from gpc1db import Gpc1Db
 from datastore import Datastore
+from dvoobjects import DvoObjects
 from batch import Batch
 
@@ -30,4 +31,5 @@
         self.gpc1Db = Gpc1Db(self.logger, self.config)
         self.datastore = Datastore(self.logger, self.config, self.ippToPspsDb)
+        self.dvoObjects = DvoObjects(self.logger, self.config)
 
         self.config.printAll()
@@ -50,17 +52,31 @@
             # queue up batches that are processed but not loaded to datastore
             for batchType in self.config.batchTypes: 
+
                 self.logger.infoTitle("Previous failed datastore loads")
                 self.publishAnyUnpublishedBatches(batchType)
 
                 # get totals for whole area to check if there is anything to do
-                processedIDs = self.ippToPspsDb.getProcessedIDs(batchType, self.config.epoch, self.config.dvoLabel)
-                consistantlyFailedIDs = self.ippToPspsDb.getConsistentlyFailedIDs(batchType, self.config.epoch, self.config.dvoLabel)
-                rows = self.gpc1Db.getItemsInThisDVODbForThisStage(
-                        self.config.dvoLabel, 
-                        batchType, 
-                        self.config.minRa, 
-                        self.config.maxRa, 
-                        self.config.minDec, 
-                        self.config.maxDec)
+                processedIDs = self.ippToPspsDb.getProcessedIDs(batchType)
+                consistantlyFailedIDs = self.ippToPspsDb.getConsistentlyFailedIDs(batchType)
+
+                # for object batches, get full list of stuff from Dvo
+                if batchType == "OB":
+                    self.dvoObjects.setSkyArea(
+                            self.config.minRa,
+                            self.config.maxRa,
+                            self.config.minDec,
+                            self.config.maxDec)
+                    rows = self.dvoObjects.allPopulatedRegionInfo
+                    self.dvoObjects.printSummary()
+
+                # for other batches, info comes from gpc1 database
+                else:
+                    rows = self.gpc1Db.getItemsInThisDVODbForThisStage(
+                            self.config.dvoLabel, 
+                            batchType, 
+                            self.config.minRa, 
+                            self.config.maxRa, 
+                            self.config.minDec, 
+                            self.config.maxDec)
 
                 # first report total stuff
@@ -125,5 +141,5 @@
     def publishAnyUnpublishedBatches(self, batchType):
     
-        batchIDs = self.ippToPspsDb.getProcessedButFailedDatastoreBatchIDs(self.config.epoch, self.config.dvoLabel, batchType)
+        batchIDs = self.ippToPspsDb.getProcessedButFailedDatastoreBatchIDs(batchType)
         self.logger.infoPair("%s batches" % batchType, "%d" % len(batchIDs))
     
