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
This commit is contained in:
Gavin D'souza 2024-07-12 20:10:30 +02:00
parent 281e04bd5e
commit aee278b6ae
No known key found for this signature in database
GPG key ID: 5413A43FBD450A34

View file

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