Skip to content

Commit

Permalink
fix(agent-job-notification): Detect OOM for all job types
Browse files Browse the repository at this point in the history
  • Loading branch information
balamurali27 committed Jan 17, 2025
1 parent bfb7f0e commit 227c62a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions press/press/doctype/agent_job/agent_job_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,9 @@ def update_with_oom_err(
):
details["title"] = "Server out of memory error"

job_type = ""
if job.job_type == "Update Site Migrate":
job_type = "Site Migrate"
elif job.job_type == "Update Site Pull":
job_type = "Site Update"

details[
"message"
] = f"""<p>The server ran out of memory while {job_type} job was running and was killed by the system.</p>
] = f"""<p>The server ran out of memory while {job.job_type} job was running and was killed by the system.</p>
<p>It is recommended to increase the memory available for the server <a class="underline" href="/dashboard/servers/{job.server}">{job.server}</a>.</p>
<p>To rectify this issue, please follow the steps mentioned in <i>Help</i>.</p>
"""
Expand Down

0 comments on commit 227c62a

Please sign in to comment.