Answer the question
In order to leave comments, you need to log in
Why does a background process start multiple background processes?
Good afternoon!
I have code like this in Python 3.x that runs the first function first, it runs the second before it completes, and then the first again. It was assumed that these two functions, performing some work once in a time interval, would work on the server constantly, in a circle:
@shared_task
def Task1(arg1):
Task2.apply_async((arg2,), countdown=86400)
@shared_task
def Task2(arg2):
rnd = random.randint(3600, 21600)
cd = 86400 + rnd
Task1.apply_async((arg1,), countdown=cd)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question