diff --git a/reportservice/manual_run.py b/reportservice/manual_run.py index 1639e8e43315e36f8e54d77a9a8ecd0f40e399ec..7e852bcb72e92fa9a7f597978a15bf9602beda84 100644 --- a/reportservice/manual_run.py +++ b/reportservice/manual_run.py @@ -9,13 +9,13 @@ import zmq import zmq.asyncio -def manual_run(req_conf): +def manual_run(req_instr): """ Run the report service manually from any machine and provide the requested configuration for reports generation. - :param req_conf: a list for generating reports for the + :param req_instr: a list for generating reports for the requested Instruments. This list can contain the Instruments names e.g ['SPB'] or ['all'] for generating reports for all @@ -32,11 +32,12 @@ def manual_run(req_conf): con = zmq.Context() socket = con.socket(zmq.REQ) con = socket.connect(port) - socket.send_pyobj(req_conf) + socket.send_pyobj(req_instr) msg = socket.recv_pyobj() logging.info('{} Manual Run'.format(msg)) arg_parser = argparse.ArgumentParser(description='Manual Launch') +arg_parser.add_argument('--req-instr', default='all', nargs='+') arg_parser.add_argument('--config-file', type=str, default='./report_conf.yaml') arg_parser.add_argument('--log-file', type=str, default='./report.log') arg_parser.add_argument('--logging', type=str, default="INFO", @@ -56,4 +57,4 @@ if __name__ == "__main__": format='%(levelname)-6s: %(asctime)s %(message)s', datefmt='%Y-%m-%d %H:%M:%S') - manual_run(['all']) + manual_run(args["req_instr"])