From 13af0d1b4a1f6880b9476b655856cebedbc41a48 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Sun, 31 Jul 2022 15:23:29 -0400 Subject: [PATCH] use the right id field --- internal/cmd/scheduler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/cmd/scheduler.go b/internal/cmd/scheduler.go index e992e2a..e749f37 100644 --- a/internal/cmd/scheduler.go +++ b/internal/cmd/scheduler.go @@ -369,7 +369,7 @@ func enqueueStuckAccounts(ctx context.Context, logger *zap.Logger, statsd *stats func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Client, pool *pgxpool.Pool, redisConn *redis.Client, luaSha string, queue rmq.Queue) { now := time.Now() - query := `SELECT id FROM accounts` + query := `SELECT reddit_account_id FROM accounts` rows, err := pool.Query(ctx, query) if err != nil { logger.Error("failed to fetch accounts", zap.Error(err)) @@ -379,9 +379,9 @@ func enqueueAccounts(ctx context.Context, logger *zap.Logger, statsd *statsd.Cli var ids []string for rows.Next() { - var id int64 + var id string _ = rows.Scan(&id) - ids = append(ids, fmt.Sprintf("%d", id)) + ids = append(ids, id) } enqueued := 0