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:
codl 2019-09-13 03:07:58 +02:00
parent 741a44bed8
commit c5c4b72c6f
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 2 additions and 1 deletions

View File

@ -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: