IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32460


Ignore:
Timestamp:
Sep 29, 2011, 3:20:12 PM (15 years ago)
Author:
rhenders
Message:

now taking a batch type argument at command line; using different IppToPspsDb methods for getting lists of batch IDs

File:
1 edited

Legend:

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

    r32254 r32460  
    1414
    1515
    16 if len(sys.argv) > 1: CONFIG  = sys.argv[1]
     16if len(sys.argv) > 2:
     17    CONFIG  = sys.argv[1]
     18    BATCHTYPE = sys.argv[2]
    1719else:
    18     print "\n** Usage: " + sys.argv[0] + " <configPath>\n"
     20    print "\n** Usage: " + sys.argv[0] + " <configPath> <batchType> [unmerged]\n"
    1921    sys.exit(1)
    2022
     
    3335EPOCH = configDoc.find("options/epoch").text
    3436
    35 if len(sys.argv) > 2 and sys.argv[2] == "all":
    36     ids = ippToPspsDb.getUnfinishedBatchIDs(EPOCH, DVOLABEL)
     37if len(sys.argv) > 3 and sys.argv[3] == "unmerged":
     38    ids = ippToPspsDb.getUnmergedBatchIDs(EPOCH, DVOLABEL, BATCHTYPE)
    3739else:
    38     ids = ippToPspsDb.getBatchIDsUnloadedToODM(EPOCH, DVOLABEL)
     40    ids = ippToPspsDb.getUnloadedBatchIDs(EPOCH, DVOLABEL, BATCHTYPE)
    3941
    4042logger.infoPair("Checking", "%d batches" % len(ids))
Note: See TracChangeset for help on using the changeset viewer.