From eb1d904f86c714bd1d1d49da74ccd5c26d3d156e Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Mon, 31 Oct 2022 21:32:43 -0400 Subject: [PATCH] change query --- internal/cmd/scheduler.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/cmd/scheduler.go b/internal/cmd/scheduler.go index ed17ebc..17a3d7a 100644 --- a/internal/cmd/scheduler.go +++ b/internal/cmd/scheduler.go @@ -457,11 +457,10 @@ func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Cli now := time.Now() query := ` - SET work_mem TO '16MB'; SELECT DISTINCT reddit_account_id FROM accounts INNER JOIN devices_accounts ON devices_accounts.account_id = accounts.id INNER JOIN devices ON devices.id = devices_accounts.device_id - WHERE grace_period_expires_at >= NOW(); + WHERE grace_period_expires_at >= NOW() ` rows, err := pool.Query(ctx, query) if err != nil {