mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 13:14:28 +00:00
Tweak remote question fetching
This commit is contained in:
parent
e24da84985
commit
2657e4a139
1 changed files with 5 additions and 3 deletions
8
tasks.py
8
tasks.py
|
@ -64,6 +64,8 @@ class Tasks:
|
|||
dt = parser.parse(question.closed or question.endTime).astimezone(timezone.utc)
|
||||
minutes = int((dt - now).total_seconds() / 60)
|
||||
|
||||
p.push(
|
||||
question.id, "/task/fetch_remote_question", delay=minutes
|
||||
) # XXX: delay expects minutes
|
||||
if minutes > 0:
|
||||
# Only push the task if the poll is not ended yet
|
||||
p.push(
|
||||
question.id, "/task/fetch_remote_question", delay=minutes
|
||||
) # XXX: delay expects minutes
|
||||
|
|
Loading…
Reference in a new issue