5 __author__ =
'Giacomo Govi'
7 import CondCore.Utilities.o2o
as o2olib
15 parser.add_argument(
"executable", type=str, help=
"wrapper for O2O jobs")
16 parser.add_argument(
"-n",
"--name", type=str, help=
"the O2O job name" )
17 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")
18 parser.add_argument(
"-d",
"--dev", action=
"store_true", help=
"bookkeeping in dev database")
19 parser.add_argument(
"-a",
"--auth", type=str, help=
"path of the authentication file")
20 parser.add_argument(
"-v",
"--verbose", action=
"store_true", help=
"job output mirrored to screen (default=logfile only)")
21 args = parser.parse_args()
24 parser.error(
"Job name not given.")
26 db_service = o2olib.prod_db_service
28 db_service = o2olib.dev_db_service
29 runMgr = o2olib.O2ORunMgr()
31 if runMgr.connect( db_service, args ):
32 ret = runMgr.executeJob( args )
35 if __name__ ==
'__main__':
36 sys.exit(
main(sys.argv))