fix: for deadlock issue keep status as In Progress

(cherry picked from commit e6ff7f0e9f)
This commit is contained in:
Rohit Waghchaure
2025-03-28 13:10:12 +05:30
committed by Mergify
parent f3cff68713
commit 34e66b1b27

View File

@@ -291,7 +291,7 @@ def repost(doc):
status = "Failed" status = "Failed"
# If failed because of timeout, set status to In Progress # If failed because of timeout, set status to In Progress
if traceback and "timeout" in traceback.lower(): if traceback and ("timeout" in traceback.lower() or "Deadlock found" in traceback):
status = "In Progress" status = "In Progress"
if traceback: if traceback:
@@ -306,6 +306,7 @@ def repost(doc):
}, },
) )
if status == "Failed":
outgoing_email_account = frappe.get_cached_value( outgoing_email_account = frappe.get_cached_value(
"Email Account", {"default_outgoing": 1, "enable_outgoing": 1}, "name" "Email Account", {"default_outgoing": 1, "enable_outgoing": 1}, "name"
) )