From c5c4b72c6f979e5ce7b3a1b43e7414f7831386ad Mon Sep 17 00:00:00 2001 From: codl Date: Fri, 13 Sep 2019 03:07:58 +0200 Subject: [PATCH] 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 --- tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 703ba73..c125ec5 100644 --- a/tasks.py +++ b/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: