limit the amount of accounts we batch at any given time

This commit is contained in:
Andre Medeiros 2021-07-09 00:50:53 -04:00
parent 60e18c37f7
commit 4a92b90df9

View file

@ -144,6 +144,7 @@ func enqueueAccounts(ctx context.Context, logger *logrus.Logger, statsd *statsd.
last_enqueued_at < $1 last_enqueued_at < $1
OR last_checked_at < $2 OR last_checked_at < $2
ORDER BY last_checked_at ORDER BY last_checked_at
LIMIT 500
) )
UPDATE accounts UPDATE accounts
SET last_enqueued_at = $3 SET last_enqueued_at = $3