From 4a92b90df987e4654c7b34d51aaabfa8c1604579 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Fri, 9 Jul 2021 00:50:53 -0400 Subject: [PATCH] limit the amount of accounts we batch at any given time --- cmd/apollo-scheduler/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/apollo-scheduler/main.go b/cmd/apollo-scheduler/main.go index a9c2b75..01604a9 100644 --- a/cmd/apollo-scheduler/main.go +++ b/cmd/apollo-scheduler/main.go @@ -144,6 +144,7 @@ func enqueueAccounts(ctx context.Context, logger *logrus.Logger, statsd *statsd. last_enqueued_at < $1 OR last_checked_at < $2 ORDER BY last_checked_at + LIMIT 500 ) UPDATE accounts SET last_enqueued_at = $3