Hello
I am trying to search into the firework db all the jobs with a particular name and status:
For example:
lpad get_fws -s RUNNING -n batch1
I get the follow error:
File "/lus/install/fireworks/scripts/lpad_run.py", line 290, in get_fw_ids_helper
raise ValueError("Please specify exactly one of (fw_id, name, state, query)")
ValueError: Please specify exactly one of (fw_id, name, state, query)
Any idea how solve this?
Thank!
EDIT:
I think the follow patch in fireworks/scripts/lpad_run.py
temporally fixes the problem:
# if sum(bool(x) for x in [args.fw_id, args.name, args.state, args.query]) > 0:
# raise ValueError("Please specify exactly one of (fw_id, name, state, query)")
# if sum(bool(x) for x in [args.fw_id, args.name, args.state, args.query]) == 0:
# args.query = "{}"
# args.display_format = args.display_format if args.display_format else "ids"
# if sum(bool(x) for x in [args.fw_id, args.name, args.qid]) > 1:
# raise ValueError("Please specify exactly one of (fw_id, name, qid)")
# else:
# args.display_format = args.display_format if args.display_format else "more"
# if args.fw_id != None:
# query1 = {"fw_id": {"$in": args.fw_id}}
# elif args.name and not args.launches_mode:
# query2 = {"name": args.name}
# elif args.state:
# query3 = {"state": args.state}
# elif args.query:
# query4 = ast.literal_eval(args.query)
# else:
# query5 = None
query = {}
query1 = {}
query2 = {}
query3 = {}
query4 = {}
query5 = {}
if args.fw_id != None:
query1 = {"fw_id": {"$in": args.fw_id}}
if args.name and not args.launches_mode:
query2 = {"name": args.name}
if args.state:
query3 = {"state": args.state}
if args.query:
query4 = ast.literal_eval(args.query)
query = {**query1, **query2, **query3, **query4, **query5}