mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 11:47:42 +00:00
update account enqueueing logic
This commit is contained in:
parent
a3d9c85c1d
commit
66c4c28cb4
1 changed files with 2 additions and 1 deletions
|
@ -116,7 +116,8 @@ func enqueueAccounts(ctx context.Context, logger *logrus.Logger, pool *pgxpool.P
|
||||||
SELECT id
|
SELECT id
|
||||||
FROM accounts
|
FROM accounts
|
||||||
WHERE
|
WHERE
|
||||||
last_checked_at + 5 < $1
|
last_checked_at + 5 < $1 AND
|
||||||
|
last_enqueued_at + 5 < $1
|
||||||
ORDER BY last_enqueued_at
|
ORDER BY last_enqueued_at
|
||||||
FOR UPDATE SKIP LOCKED
|
FOR UPDATE SKIP LOCKED
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue