Index: trunk/ippToPsps/jython/loader.py
===================================================================
--- trunk/ippToPsps/jython/loader.py	(revision 35174)
+++ trunk/ippToPsps/jython/loader.py	(revision 35175)
@@ -125,17 +125,25 @@
         while True:
 
-            abort = False
-            for batchType in self.skychunk.batchTypes:
-
-                # get a stripe's worth of box IDs
-                boxIds = self.ippToPspsDb.getStripeBoxIds(self.HOST, self.PID, batchType)
-
-                numAttempts += 1
-
-                self.logger.infoPair("Boxes with unprocessed data", "%d" % len(boxIds))
-                self.logger.infoPair("numAttempts", str(numAttempts))
-                if len(boxIds) > 0: numAttempts = 0
-
-                for boxId in boxIds:
+            # get a stripe's worth of box IDs
+            boxIds = self.ippToPspsDb.getStripeBoxIdsAnyBatch(self.HOST, self.PID)
+            self.logger.infoPair("Boxes with unprocessed data", "%d" % len(boxIds))
+            self.logger.infoPair("numAttempts", str(numAttempts))
+
+            if len(boxIds) > 0: numAttempts = 0
+            numAttempts += 1
+
+            for boxId in boxIds:
+
+                # get box info. if boxes have changed, break and start again
+                try:
+                    boxDim = self.ippToPspsDb.getBoxDimensions(boxId)
+                except:
+                    self.logger.infoPair("Can't get details for this box", "%d" % boxId)
+                    break
+                self.logger.infoPair("client status", "ok")
+
+                abort = False
+                for batchType in self.skychunk.batchTypes:
+
                     self.logger.infoPair("Check","client status")
                     if not self.checkClientStatus():
@@ -143,11 +151,5 @@
                         break
                     self.logger.infoPair("client status", "ok")
-                    # get box info. if boxes have changed, break and start again
-                    try:
-                        boxDim = self.ippToPspsDb.getBoxDimensions(boxId)
-                    except:
-                        self.logger.infoPair("Can't get details for this box", "%d" % boxId)
-                        break
-                    self.logger.infoPair("client status", "ok")
+
                     ids = self.ippToPspsDb.getPendingIdsForThisBox(boxId, batchType)
                 
