From aee278b6aec4f19e20af8c0da3ebd54f9f1edbac Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 12 Jul 2024 20:10:30 +0200 Subject: [PATCH] fix: Pass string method path to q.enqueue_call Passing a method results in rq doing some internal gymnastics to generate this string. In our case, this function never changes so we can get rid of those steps --- frappe/utils/background_jobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/background_jobs.py b/frappe/utils/background_jobs.py index 815145ef70..4e2a7c71b9 100644 --- a/frappe/utils/background_jobs.py +++ b/frappe/utils/background_jobs.py @@ -163,7 +163,7 @@ def enqueue( def enqueue_call(): return q.enqueue_call( - execute_job, + "frappe.utils.background_jobs.execute_job", on_success=Callback(func=on_success) if on_success else None, on_failure=Callback(func=on_failure) if on_failure else None, timeout=timeout,