From b8e0bbd1ade98ef53ec8c98e481b3828654fac56 Mon Sep 17 00:00:00 2001
From: Karim Ahmed <karim.ahmed@xfel.eu>
Date: Mon, 15 Jul 2019 14:52:39 +0200
Subject: [PATCH] CLI manual_run input

---
 reportservice/manual_run.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/reportservice/manual_run.py b/reportservice/manual_run.py
index 1639e8e43..7e852bcb7 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"])
-- 
GitLab