mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-13 17:13:11 +01:00
backfill: re-dispatch if 15 minutes have elapsed
If 15 minutes have passed since the backfill request was dispatched and backfill hasn't completed, then re-dispatch.
This commit is contained in:
parent
2ae3d7f5ae
commit
feb9f71cb5
1 changed files with 7 additions and 1 deletions
|
@ -82,7 +82,13 @@ const (
|
|||
FROM backfill_queue
|
||||
WHERE user_mxid=$1
|
||||
AND type IN (%s)
|
||||
AND dispatch_time IS NULL
|
||||
AND (
|
||||
dispatch_time IS NULL
|
||||
OR (
|
||||
dispatch_time < current_timestamp - interval '15 minutes'
|
||||
AND completed_at IS NULL
|
||||
)
|
||||
)
|
||||
ORDER BY type, priority, queue_id
|
||||
LIMIT 1
|
||||
`
|
||||
|
|
Loading…
Reference in a new issue