From 227c62a46517339039b8c20e420f3a9abe35408a Mon Sep 17 00:00:00 2001 From: Balamurali M Date: Fri, 17 Jan 2025 13:10:57 +0530 Subject: [PATCH] fix(agent-job-notification): Detect OOM for all job types --- press/press/doctype/agent_job/agent_job_notifications.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/press/press/doctype/agent_job/agent_job_notifications.py b/press/press/doctype/agent_job/agent_job_notifications.py index b392904989..8c34089766 100644 --- a/press/press/doctype/agent_job/agent_job_notifications.py +++ b/press/press/doctype/agent_job/agent_job_notifications.py @@ -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"""

The server ran out of memory while {job_type} job was running and was killed by the system.

+ ] = f"""

The server ran out of memory while {job.job_type} job was running and was killed by the system.

It is recommended to increase the memory available for the server {job.server}.

To rectify this issue, please follow the steps mentioned in Help.

"""