fix casting

This commit is contained in:
Andre Medeiros 2022-11-02 01:11:49 -04:00
parent 6310d51eae
commit d27f4604b9
3 changed files with 3 additions and 3 deletions

View file

@ -50,7 +50,7 @@ func (snw *stuckNotificationsWorker) Process(ctx context.Context, args ...interf
_ = snw.statsd.Histogram("apollo.consumer.runtime", float64(elapsed), []string{"queue:stuck-notifications"}, 0.1) _ = snw.statsd.Histogram("apollo.consumer.runtime", float64(elapsed), []string{"queue:stuck-notifications"}, 0.1)
}() }()
id := args[0].(int64) id := int64(args[0].(float64))
snw.logger.Debug("starting job", zap.Int64("account#id", id)) snw.logger.Debug("starting job", zap.Int64("account#id", id))
account, err := snw.accountRepo.GetByID(ctx, id) account, err := snw.accountRepo.GetByID(ctx, id)

View file

@ -79,7 +79,7 @@ func NewSubredditsWorker(ctx context.Context, logger *zap.Logger, statsd *statsd
} }
func (sw *subredditsWorker) Process(ctx context.Context, args ...interface{}) error { func (sw *subredditsWorker) Process(ctx context.Context, args ...interface{}) error {
id := args[0].(int64) id := int64(args[0].(float64))
sw.logger.Debug("starting job", zap.Int64("subreddit#id", id)) sw.logger.Debug("starting job", zap.Int64("subreddit#id", id))
subreddit, err := sw.subredditRepo.GetByID(ctx, id) subreddit, err := sw.subredditRepo.GetByID(ctx, id)

View file

@ -75,7 +75,7 @@ func NewTrendingWorker(ctx context.Context, logger *zap.Logger, statsd *statsd.C
} }
func (tw *trendingWorker) Process(ctx context.Context, args ...interface{}) error { func (tw *trendingWorker) Process(ctx context.Context, args ...interface{}) error {
id := args[0].(int64) id := int64(args[0].(float64))
tw.logger.Debug("starting job", zap.Int64("subreddit#id", id)) tw.logger.Debug("starting job", zap.Int64("subreddit#id", id))
subreddit, err := tw.subredditRepo.GetByID(ctx, id) subreddit, err := tw.subredditRepo.GetByID(ctx, id)