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(
"-d",
"--dev", action=
"store_true", help=
"bookkeeping in dev database")
18 parser.add_argument(
"-p",
"--private", action=
"store_true", help=
"bookkeeping in private database")
19 parser.add_argument(
"-a",
"--auth", type=str, help=
"path of the authentication file")
20 args = parser.parse_args()
23 parser.error(
"Job name not given.")
25 command = args.executable
30 db_service = o2olib.dev_db_service
32 db_service = o2olib.prod_db_service
33 runMgr = o2olib.O2ORunMgr()
35 if runMgr.connect( db_service, args.auth ):
36 ret = runMgr.executeJob( args.name, command )
39 if __name__ ==
'__main__':
40 sys.exit(
main(sys.argv))