mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 21:27:42 +00:00
use the right id field
This commit is contained in:
parent
bb2f709259
commit
13af0d1b4a
1 changed files with 3 additions and 3 deletions
|
@ -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) {
|
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()
|
now := time.Now()
|
||||||
|
|
||||||
query := `SELECT id FROM accounts`
|
query := `SELECT reddit_account_id FROM accounts`
|
||||||
rows, err := pool.Query(ctx, query)
|
rows, err := pool.Query(ctx, query)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("failed to fetch accounts", zap.Error(err))
|
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
|
var ids []string
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id int64
|
var id string
|
||||||
_ = rows.Scan(&id)
|
_ = rows.Scan(&id)
|
||||||
ids = append(ids, fmt.Sprintf("%d", id))
|
ids = append(ids, id)
|
||||||
}
|
}
|
||||||
|
|
||||||
enqueued := 0
|
enqueued := 0
|
||||||
|
|
Loading…
Reference in a new issue