ensure fetch_acc is rescheduled properly when doing historic fetch
the unique flag on the task means we can't reschedule it for right now but we must wait for the current one to end. this commit introduces a 1 second delay before the task is ran again, which should be enough
This commit is contained in:
parent
741a44bed8
commit
c5c4b72c6f
3
tasks.py
3
tasks.py
|
@ -180,7 +180,8 @@ def fetch_acc(id_):
|
|||
|
||||
if not account.fetch_history_complete:
|
||||
# reschedule immediately if we're still doing the historic fetch
|
||||
fetch_acc.apply_async((id_,))
|
||||
print("{} is not done fetching history, resheduling.".format(account))
|
||||
fetch_acc.apply_async((id_,), countdown=1)
|
||||
|
||||
|
||||
except TemporaryError:
|
||||
|
|
Loading…
Reference in New Issue