From 12eb1b094da2b9bdf0d5690d29d59938fe9ac0e9 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Fri, 20 Sep 2024 14:16:01 -0400 Subject: [PATCH] Retry container monitor POST if it fails --- lib/galaxy/job_execution/container_monitor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/job_execution/container_monitor.py b/lib/galaxy/job_execution/container_monitor.py index dfed37daf8d0..0590ce715db9 100644 --- a/lib/galaxy/job_execution/container_monitor.py +++ b/lib/galaxy/job_execution/container_monitor.py @@ -75,7 +75,8 @@ def main(): if ports[key]["host"] == "0.0.0.0": ports[key]["host"] = host_ip if callback_url: - requests.post(callback_url, json={"container_runtime": ports}, timeout=DEFAULT_SOCKET_TIMEOUT) + r = requests.post(callback_url, json={"container_runtime": ports}, timeout=DEFAULT_SOCKET_TIMEOUT) + r.raise_for_status() else: with open("container_runtime.json", "w") as f: json.dump(ports, f)