fix(enqueue): pass the original method argument here

Don't pass the stringified version - this is what goes to RQ, and the string we construct isn't always "correct"

For example, 87d121f47a/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>
This commit is contained in:
Akhil Narang 2024-03-29 14:05:33 +05:30
parent 2feacf5443
commit 8658196650
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -151,7 +151,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,