IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32836 for trunk/ippToPsps


Ignore:
Timestamp:
Nov 30, 2011, 11:08:44 AM (15 years ago)
Author:
rhenders
Message:

New method to 'reset' a batch, basically, pretend it was never loaded to the datastore so that it can be reloaded

File:
1 edited

Legend:

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

    r32802 r32836  
    107107    want to load a test batch to PSPS
    108108
    109     ALSO, check that these batches are more than 4 HOURs old, so that we don't attempt to
    110     publish something simulataneously with the client that it producing them
     109    We also check that these batches are more than 4 HOURs old, so that we don't attempt to
     110    publish something simulataneously with the client that it producing it
    111111    '''
    112112    def getProcessedButFailedDatastoreBatchIDs(self, epoch, dvoGpc1Label, batchType):
     
    662662        self.execute(sql)
    663663
     664    '''
     665    Resets a batch ready for re-loading to the datastore
     666    '''
     667    def resetBatch(self, batchID):
     668
     669        sql = "UPDATE batch SET \
     670               loaded_to_datastore = 0, \
     671               loaded_to_ODM = 0, \
     672               deleted_datastore = 0, \
     673               deleted_dxlayer = 0, \
     674               comment = 'This batch was reset, ready for re-load to datastore' \
     675               WHERE batch_id = " + str(batchID)
     676
     677        self.execute(sql)
    664678
    665679    '''
Note: See TracChangeset for help on using the changeset viewer.