Hi, 1) I use frappe.enqueue() to run a method. And after this enqueue finish I want to run another method (not enqueued). But since the enqueue takes some times, the second method runs before the enqueued method finish.
enqueue('first_method')
second_method()
How to wait for the first enqueue to finish and then run the second method?
2) On other case, if I have a set of enqueues that runs together (e.g because 2 users click the same button at almost the same time):
def button_click():
enqueue(third_method) #while this method runs for user1, user2 clicks the button so it's also enqueued for user2
enqueue(fourth_method)
So to illustrate the background jobs will be like this:
the issue that here some stander methodes call enqueue liek if you cancel jouran have more 900 rows and after canclation you want to delete
in this case how to await for canclation to execute the delete