From 39c563d0d7e16f748020bf5f3c9df2bf978f15d4 Mon Sep 17 00:00:00 2001 From: "Joran R. Angevaare" Date: Mon, 16 Jan 2023 15:45:17 +0100 Subject: [PATCH] Fix bootstrax timeouts (#1133) * Update bootstrax * simple syntax is good syntax --- bin/bootstrax | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/bootstrax b/bin/bootstrax index 6410c10c2..21e44de83 100755 --- a/bin/bootstrax +++ b/bin/bootstrax @@ -122,7 +122,7 @@ timeouts = { 'retry_run': 60, # Maximum time [s] for strax to complete a processing # if exceeded, strax will be killed by bootstrax - 'max_processing_time': 24*36000, + 'max_processing_time': 48*3600, # Max processing time [s] for bootstrax to finish processing after run ended 'max_processing_time_after_completion': 13*3600, # Every this many [s] we should have at least one new file written to disk @@ -1499,11 +1499,13 @@ def process_run(rd, send_heartbeats=args.production): fail(f"Processing took longer than {timeouts['max_processing_time']} sec") # Fail because we are taking a very long time to process despite the run having ended - if (get_end_time(rd) is not None - and t0 < now(-timeouts['max_processing_time_after_completion'])): - kill_process(strax_proc.pid) - fail(f"After the run ended, processing did not succeed in " - f"{timeouts['max_processing_time_after_completion']} sec.") + endtime = get_end_time(rd) + if (endtime is not None + and endtime < now(-timeouts['max_processing_time_after_completion']) + ): + kill_process(strax_proc.pid) + fail(f"After the run ended, processing did not succeed in " + f"{timeouts['max_processing_time_after_completion']} sec.") # Fail because for some reason, we are not writing any new files to disk. if (t0 < now(-timeouts['max_no_write_time'])