I have got two functions. The first one
@task(timedelta(seconds=2))
def check_data_status():
is checking data status and setting global flag isSuccess to True.
The second one is response handler def new_answer(request):. But the second one should complete response(answer) only when first one will set flag isSuccess to True.
How I can organize it in code?