IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 23, 2011, 4:16:33 PM (15 years ago)
Author:
rhenders
Message:

add extra constraints when gathering batches that have not loaded to datastore - they have to be older than 4 hours and newer than 2011-10-27

File:
1 edited

Legend:

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

    r32781 r32802  
    103103    '''
    104104    Returns a list of processed batch IDs that are not loaded to the datastore
     105    NB we have a date constraint here because, before this time, it is possible that
     106    a test batch would be labelled as processed but not loaded to datastore, and we would NOT
     107    want to load a test batch to PSPS
     108
     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
    105111    '''
    106112    def getProcessedButFailedDatastoreBatchIDs(self, epoch, dvoGpc1Label, batchType):
     
    112118               AND dvo_db = '" + dvoGpc1Label + "' \
    113119               AND processed = 1\
    114                AND loaded_to_datastore = -1"
     120               AND loaded_to_datastore != 1 \
     121               AND timestamp > '2011-10-27' \
     122               AND timestamp < now() -  INTERVAL 4 HOUR"
    115123
    116124        ids = []
Note: See TracChangeset for help on using the changeset viewer.