IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 6, 2012, 3:19:54 PM (14 years ago)
Author:
heather
Message:

current working ipptopsps - has too much info/debug/print stuff and also funny out of range number hack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/loader.py

    r33832 r34661  
    123123
    124124                self.logger.infoPair("Boxes with unprocessed data", "%d" % len(boxIds))
    125    
     125                self.logger.infoPair("numAttempts", str(numAttempts))
    126126                if len(boxIds) > 0: numAttempts = 0
    127127
    128128                for boxId in boxIds:
    129          
     129                    self.logger.infoPair("Check","client status")
    130130                    if not self.checkClientStatus():
    131131                        abort = True
    132132                        break
    133    
     133                    self.logger.infoPair("client status", "ok")
    134134                    # get box info. if boxes have changed, break and start again
    135135                    try:
     
    138138                        self.logger.infoPair("Can't get details for this box", "%d" % boxId)
    139139                        break
    140      
     140                    self.logger.infoPair("client status", "ok")
    141141                    ids = self.ippToPspsDb.getPendingIdsForThisBox(boxId, batchType)
    142142               
     
    150150                    self.logger.infoPair(batchType + " items found in this box", "%d" % len(ids))
    151151                    boxSizeWithBorder = boxDim['SIDE'] + (self.config.BORDER * 2)
    152      
     152                    self.logger.infoPair("got here", "ok")
    153153                    useFullTables = 0
    154154                    if batchType != "OB":
     
    174174                        abort = True
    175175                        break
    176 
     176                    self.logger.infoPair("processed","ok")
    177177            if abort or not self.checkClientStatus(): abort = True
    178178            elif numAttempts > 1 and not self.waitForPollTime():  break
     
    188188        # loop round IDs of all items to be processed
    189189        self.ippToPspsDb.lockBatchTable()
     190        self.logger.infoPair("heather:","lockbatchtable")
    190191        unattemptedCount = 0
    191192        for id in ids:
    192    
     193            self.logger.infoPair("heather:","in ids")
     194            self.logger.infoPair("heather:id",str(id))
    193195            batchID = self.ippToPspsDb.createNewBatch(batchType, id)
    194            
     196            self.logger.infoPair("heather:","creatednewbatch")
     197            self.logger.infoPair("heather:batchId", str(batchID))
    195198            if batchID < 0:
    196199                unattemptedCount += 1
    197200                continue
    198    
     201            self.logger.infoPair("heather:","passed logic")
    199202            self.ippToPspsDb.unlockTables()
     203            self.logger.infoPair("heather:","unlock table")
    200204            self.ippToPspsDb.deletePendingItem(batchType, id)
     205            self.logger.infoPair("heather:","deleted pending item")
    201206
    202207            # catch any raised exceptions in batch constructors
     
    234239   
    235240            # if batch fails, ignore and move on to the next one
    236             except:
     241            except Exception, e:
     242                self.logger.error("EXCEPTION: " + str(e))
    237243                self.logger.errorPair("Problem with this %s batch (%d)" % (batchType, id), "skipping")
    238244                pass
    239245
    240246            if not self.checkClientStatus(): return False
    241    
     247            self.logger.infoPair("checkclient status", "ok")
     248
    242249            self.ippToPspsDb.lockBatchTable()
    243    
     250            self.logger.infoPair("lockbatchtable", "ok")
    244251            self.logger.infoSeparator()
    245252   
Note: See TracChangeset for help on using the changeset viewer.