From frappeframework docs:
def long_job(arg1, arg2):
frappe.publish_realtime('msgprint', 'Starting long job...')
# this job takes a long time to process
frappe.publish_realtime('msgprint', 'Ending long job...')
def enqueue_long_job(arg1, args2):
enqueue('myapp.mymodule.long_job', arg1=arg1, arg2=arg2)
Can we chain the function like:
def long_job(arg1, arg2):
frappe.publish_realtime('msgprint', 'Starting long job...')
# this job takes a long time to process
frappe.publish_realtime('msgprint', 'Ending long job...')
also_long_job(arg1, arg2)
def also_long_job(arg1, arg2):
frappe.publish_realtime('msgprint', 'Starting also long job...')
# this job takes a long time to process
frappe.publish_realtime('msgprint', 'Ending also long job...')
def enqueue_long_job(arg1, args2):
enqueue('myapp.mymodule.long_job', arg1=arg1, arg2=arg2)
Will the also_long_job also included in the same background job?