Skip to content

Commit

Permalink
Retry container monitor POST if it fails
Browse files Browse the repository at this point in the history
  • Loading branch information
natefoo committed Sep 20, 2024
1 parent 307acd9 commit 12eb1b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/galaxy/job_execution/container_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 12eb1b0

Please sign in to comment.