mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +00:00
change query
This commit is contained in:
parent
d468a6e88b
commit
eb1d904f86
1 changed files with 1 additions and 2 deletions
|
@ -457,11 +457,10 @@ func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Cli
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
|
|
||||||
query := `
|
query := `
|
||||||
SET work_mem TO '16MB';
|
|
||||||
SELECT DISTINCT reddit_account_id FROM accounts
|
SELECT DISTINCT reddit_account_id FROM accounts
|
||||||
INNER JOIN devices_accounts ON devices_accounts.account_id = accounts.id
|
INNER JOIN devices_accounts ON devices_accounts.account_id = accounts.id
|
||||||
INNER JOIN devices ON devices.id = devices_accounts.device_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)
|
rows, err := pool.Query(ctx, query)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue