From 1f63da65a310ddec5d136953b4b8c6f8bcd5d215 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Wed, 28 Jul 2021 21:18:12 +1000 Subject: [PATCH] add explicit time offset to cut_sync_race --- cut_sync_race.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cut_sync_race.py b/cut_sync_race.py index 7e92675..adf4070 100644 --- a/cut_sync_race.py +++ b/cut_sync_race.py @@ -78,10 +78,12 @@ def add_range(base, range): return [base + datetime.timedelta(seconds=n) for n in range] +@argh.arg('--time-offset', type=float) def main(match_id, race_number, output_path, host='condor.live', user='necrobot-read', password='necrobot-read', database='condor_x2', base_dir='/srv/wubloader', start_range="0,10", non_interactive=False, racer=0, + time_offset=None, ): logging.basicConfig(level=logging.INFO) @@ -131,7 +133,7 @@ def main(match_id, race_number, output_path, temp_dir = tempfile.mkdtemp() try: - cut_race(base_dir, output_path, temp_dir, racer, start, duration, start_range=start_range, non_interactive=non_interactive) + cut_race(base_dir, output_path, temp_dir, racer, start, duration, start_range=start_range, non_interactive=non_interactive, time_offset=time_offset) finally: shutil.rmtree(temp_dir, ignore_errors=True)