mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-15 00:17:42 +00:00
fix casting
This commit is contained in:
parent
6310d51eae
commit
d27f4604b9
3 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue