IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32040 for trunk/ippToPsps


Ignore:
Timestamp:
Aug 4, 2011, 4:13:50 PM (15 years ago)
Author:
rhenders
Message:

now checks the config for IDs to process. If not found, it defaults to DVO

File:
1 edited

Legend:

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

    r32037 r32040  
    2323    logger.infoTitle("Queuing " + batchType + " items")
    2424
    25     # get list of all items available in DVO
    26     allIDs = gpc1Db.getIDsInThisDVODbForThisStage(DVOGPC1LABEL, batchType)
    27     logger.infoPair("All %s items in DVO" % batchType, "%d" % len(allIDs))
     25    allIDs = []
     26
     27    # see if there are any IDs listed in the config
     28    try:
     29        for element in configDoc.findall('options/ids/id'):
     30            allIDs.append(int(element.text))
     31    except:
     32        logger.errorPair("Problem loading IDs from config under", "options/ids/id")
     33
     34    # no config dictated IDs, so get from DVO instead
     35    if len(allIDs) > 0:
     36        logger.infoPair("Using config IDs (not DVO)", "%d" % len(allIDs))
     37    else:
     38        allIDs = gpc1Db.getIDsInThisDVODbForThisStage(DVOGPC1LABEL, batchType)
     39        logger.infoPair("All %s items in DVO" % batchType, "%d" % len(allIDs))
    2840
    2941    # if in FORCE mode, then queue full list
    30     if FORCE:
    31         ids = allIDs
     42    if FORCE: ids = allIDs
    3243
    3344    # if not in TEST mode, then only queue un-processed items
Note: See TracChangeset for help on using the changeset viewer.