Merge pull request #46775 from rohitwaghchaure/fixed-support-34440

fix: for deadlock issue keep status as In Progress
This commit is contained in:
rohitwaghchaure
2025-03-28 23:45:25 +05:30
committed by GitHub

View File

@@ -286,7 +286,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:
@@ -301,6 +301,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"
) )