IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32007 for trunk/ippToPsps


Ignore:
Timestamp:
Aug 3, 2011, 3:34:26 PM (15 years ago)
Author:
rhenders
Message:

can now create IN batches

File:
1 edited

Legend:

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

    r32000 r32007  
    11#!/usr/bin/env jython
    22
    3 # The starting point for ippTopsps. Run with TODO....
     3# The starting point for ippTopsps. See usage below.
    44
    55import time
    … …  
    1111from gpc1db import Gpc1Db
    1212from ipptopspsdb import IppToPspsDb
     13
     14from initbatch import InitBatch
    1315from stackbatch import StackBatch
    1416from detectionbatch import DetectionBatch
    … …  
    6971'''
    7072
    71 if len(sys.argv) > 1: CONFIG  = sys.argv[1]
     73if len(sys.argv) > 1: CONFIG = sys.argv[1]
    7274else:
    73     print "** Usage: " + sys.argv[0] + " <configPath>"
     75    print "** Usage: " + sys.argv[0] + " <configPath> [init]"
    7476    sys.exit(1)
     77
     78if len(sys.argv) > 2 and sys.argv[2] == "init":
     79    QUEUE_IN = 1
     80    print "JKJKJKJKJK\n\n"
     81else:
     82    QUEUE_IN = 0
    7583
    7684# open config file
    … …  
    98106
    99107# prompt user: FORCE and PUBLISH is a dangerous combination
    100 if FORCE and PUBLISH:
    101    response = raw_input("Are you sure you want to publish data with the 'force' option enabled (y/n)? ")
     108if FORCE and PUBLISH and not QUEUE_IN:
     109   response = raw_input("*** Are you sure you want to publish data with the 'force' option enabled (y/n)? ")
    102110   if response != "y": sys.exit(1)
    103111
    … …  
    125133
    126134    # queue all items for all batch types, sequentially
     135    if QUEUE_IN:
     136       batch = InitBatch(logger, CONFIG, configDoc, gpc1Db, ippToPspsDb)
     137       batch.printMe()
     138       batch.run()
     139       break;
     140
    127141    if QUEUE_P2: queueItems("P2")
    128142    if QUEUE_ST: queueItems("ST")
Note: See TracChangeset for help on using the changeset viewer.