schedule accounts in a predictable order

This commit is contained in:
Andre Medeiros 2022-11-05 15:57:22 -04:00
parent b0fadfb6d8
commit e5e964f7e0

View file

@ -461,6 +461,7 @@ func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Cli
INNER JOIN devices ON devices.id = devices_accounts.device_id
WHERE grace_period_expires_at >= NOW()
AND accounts.is_deleted IS FALSE
ORDER BY reddit_account_id
`
rows, err := pool.Query(ctx, query)
if err != nil {