Skip to content

Commit

Permalink
Merge pull request #18863 from natefoo/container-monitor-retry-post
Browse files Browse the repository at this point in the history
[24.1] Retry container monitor POST if it fails (don't assume it succeeded)
  • Loading branch information
mvdbeek authored Sep 22, 2024
2 parents 307acd9 + 12eb1b0 commit 362cc29
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 362cc29

Please sign in to comment.