django-background-tasks
django-background-tasks copied to clipboard
Tasks sequencial execution
Is there someway to schedule tasks and the execution happens sequentially (as a queue, fist in first out)? The second tasks should be processed only after the first one finish. The tasks should have a dependency based on the previous tasks (on the same queue) finish first.
I tried to handle this using the code actually. When the first task has ended, I called the function that triggers the second task.
@background(schedule=1)
def task1():
# Do something
task2();
@background(schedule=1)
def task2():
# Do the remainder
@masudias , in my use case the event to schedule the task 1 and 2 are independent, so I can not schedule que task 2 during the execution of the task 1.