diff --git a/frappe/utils/background_jobs.py b/frappe/utils/background_jobs.py index cb5bf863c9c1..7b9113458dfb 100755 --- a/frappe/utils/background_jobs.py +++ b/frappe/utils/background_jobs.py @@ -48,6 +48,7 @@ def enqueue(method, enqueue_after_commit=False, *, at_front=False, + depends_on=None, **kwargs): ''' Enqueue method to be executed using a background worker @@ -91,7 +92,8 @@ def enqueue(method, }) return frappe.flags.enqueue_after_commit else: - return q.enqueue_call(execute_job, timeout=timeout, kwargs=queue_args, at_front=at_front) + return q.enqueue_call(execute_job, timeout=timeout, kwargs=queue_args, at_front=at_front, + depends_on=depends_on) def enqueue_doc(doctype, name=None, method=None, queue='default', timeout=300, now=False, **kwargs):