From 9ca65986d95cc48ff21e871a3a0d00befecdceee Mon Sep 17 00:00:00 2001 From: Carlo Fuselli Date: Tue, 12 Dec 2023 15:26:26 +0100 Subject: [PATCH] Min run number as arg (#295) --- amstrax/auto_processing/copy_live.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/amstrax/auto_processing/copy_live.py b/amstrax/auto_processing/copy_live.py index 53025192..ecad0875 100644 --- a/amstrax/auto_processing/copy_live.py +++ b/amstrax/auto_processing/copy_live.py @@ -32,6 +32,8 @@ def parse_args(): help='The location where the logs should be stored') parser.add_argument('--ssh_host', type=str, default='stbc', help='The host that you want to copy the data to') + parser.add_argument('--min_run_number', type=int, default=1555, + help='The minimum run number to start copying from') parser.add_argument('--production', action='store_true', default=False, help='If you want to run the script in production mode') return parser.parse_args() @@ -71,7 +73,7 @@ def get_rundocs(runsdb, args): base_query = { # end is at least 1 second ago 'end': {'$lt': datetime.datetime.now() - datetime.timedelta(seconds=1)}, - 'number': {'$gt': 2000}, + 'number': {'$gt': args.min_run_number}, 'data': { '$elemMatch': { 'type': 'live',