Skip to content

Commit

Permalink
fix(enqueue): pass the original method argument here (#25722)
Browse files Browse the repository at this point in the history
Don't pass the stringified version - this is what goes to RQ, and the string we construct isn't always "correct"

For example, https://github.com/frappe/frappe/blob/87d121f47a4afc507442a97bf1854bb3d17f42c6/frappe/email/doctype/email_queue/email_queue.py#L735-L736 generates `frappe.email.doctype.email_queue.email_queue.QueueBuilder.send_emails` which will result in `ModuleNotFoundError: No module named 'frappe.email.doctype.email_queue.email_queue.QueueBuilder'; 'frappe.email.doctype.email_queue.email_queue' is not a package`

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
(cherry picked from commit 8658196)

Co-authored-by: Akhil Narang <me@akhilnarang.dev>
  • Loading branch information
mergify[bot] and akhilnarang committed Mar 29, 2024
1 parent a027da1 commit 2c14450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frappe/utils/background_jobs.py
Expand Up @@ -139,7 +139,7 @@ def enqueue(
queue_args = {
"site": frappe.local.site,
"user": frappe.session.user,
"method": method_name,
"method": method,
"event": event,
"job_name": job_name or method_name,
"is_async": is_async,
Expand Down

0 comments on commit 2c14450

Please sign in to comment.