mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +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
|
||||
FROM accounts
|
||||
WHERE
|
||||
last_checked_at + 5 < $1
|
||||
last_checked_at + 5 < $1 AND
|
||||
last_enqueued_at + 5 < $1
|
||||
ORDER BY last_enqueued_at
|
||||
FOR UPDATE SKIP LOCKED
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue