mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 13:17:42 +00:00
prioritize by last time accounts were checked
This commit is contained in:
parent
66c4c28cb4
commit
2b9da40594
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ func enqueueAccounts(ctx context.Context, logger *logrus.Logger, pool *pgxpool.P
|
|||
WHERE
|
||||
last_checked_at + 5 < $1 AND
|
||||
last_enqueued_at + 5 < $1
|
||||
ORDER BY last_enqueued_at
|
||||
ORDER BY last_checked_at
|
||||
FOR UPDATE SKIP LOCKED
|
||||
)
|
||||
UPDATE accounts
|
||||
|
|
Loading…
Reference in a new issue