CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
o2oRun Namespace Reference

Functions

def main
 

Variables

string __author__ = 'Giacomo Govi'
 

Function Documentation

def o2oRun.main (   argv)

Definition at line 12 of file o2oRun.py.

12 
13 def main( argv ):
14 
15  parser = argparse.ArgumentParser()
16  parser.add_argument("executable", type=str, help="wrapper for O2O jobs")
17  parser.add_argument("-n","--name", type=str, help="the O2O job name" )
18  parser.add_argument("-i","--inputFromDb", action="store_true", help="get input params from the db ( labels: '$db' for the database connection string; '$tag' for the destination tag name")
19  parser.add_argument("-d","--dev", action="store_true", help="bookkeeping in dev database")
20  parser.add_argument("-a","--auth", type=str, help="path of the authentication file")
21  parser.add_argument("-v","--verbose", action="store_true", help="job output mirrored to screen (default=logfile only)")
22  args = parser.parse_args()
23 
24  if not args.name:
25  parser.error("Job name not given.")
26 
27  db_service = o2olib.prod_db_service
28  if args.dev:
29  db_service = o2olib.dev_db_service
30  runMgr = o2olib.O2ORunMgr()
31  ret = -1
32  if runMgr.connect( db_service, args ):
33  ret = runMgr.executeJob( args )
34  return ret
def main
Definition: o2oRun.py:12

Variable Documentation

string o2oRun.__author__ = 'Giacomo Govi'

Definition at line 5 of file o2oRun.py.