IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

now, batch types to be queued are set in config, not the command-line

File:
1 edited

Legend:

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

    r31863 r31978  
    6767'''
    6868
    69 # check to see if we have a batch type
    70 if len(sys.argv) > 1: BATCHTYPE  = sys.argv[1]
    71 else: BATCHTYPE = "ALL"
    72 
    7369# set up logging
    7470logging.config.fileConfig("logging.conf")
     
    9187EPOCH = configDoc.find("options/epoch").text
    9288PUBLISH = int(configDoc.find("options/publishToDatastore").text)
     89QUEUE_P2 = int(configDoc.find("options/publishToDatastore").text)
     90QUEUE_ST = int(configDoc.find("options/publishToDatastore").text)
    9391
    9492# prompt user: FORCE and PUBLISH is a dangerous combination
     
    9997# print info to log
    10098logger.infoSeparator()
    101 logger.infoPair("Batch type", BATCHTYPE)
    10299logger.infoPair("Loading epoch", EPOCH)
    103 logger.infoPair("Forcing?", "%d" % FORCE)
    104 logger.infoPair("Test mode?", "%d" % TEST)
    105100logger.infoPair("DVO gpc1 label", DVOGPC1LABEL)
     101logger.infoBool("Queuing P2 batches?", QUEUE_P2)
     102logger.infoBool("Queuing ST batches?", QUEUE_ST)
     103logger.infoBool("Forcing?", "%d" % FORCE)
     104logger.infoBool("Test mode?", "%d" % TEST)
     105logger.infoBool("Publishing?", PUBLISH)
    106106
    107107'''
     
    117117
    118118    # queue all items for all batch types, sequentially
    119     if BATCHTYPE == "ALL":
    120         queueItems("P2")
    121         queueItems("ST")
    122     # queue only items for the user-specified batch type
    123     else:
    124         queueItems(BATCHTYPE)
     119    if QUEUE_P2: queueItems("P2")
     120    if QUEUE_ST: queueItems("ST")
    125121
    126122    # in the TEST mode, we quit after submitting one batch
Note: See TracChangeset for help on using the changeset viewer.