mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-24 12:47:43 +00:00
Revert "try enqueue accounts in a loop instead"
This reverts commit 9b5829f549
.
This commit is contained in:
parent
01ad9f3d1e
commit
0938400dd7
1 changed files with 1 additions and 7 deletions
|
@ -92,13 +92,7 @@ func SchedulerCmd(ctx context.Context) *cobra.Command {
|
|||
}
|
||||
|
||||
s := gocron.NewScheduler(time.UTC)
|
||||
go func() {
|
||||
for {
|
||||
enqueueAccounts(ctx, logger, statsd, db, redis, luaSha, notifQueue)
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}
|
||||
}()
|
||||
//_, _ = s.Every(100).Milliseconds().SingletonMode().Do(func() { enqueueAccounts(ctx, logger, statsd, db, redis, luaSha, notifQueue) })
|
||||
_, _ = s.Every(100).Milliseconds().SingletonMode().Do(func() { enqueueAccounts(ctx, logger, statsd, db, redis, luaSha, notifQueue) })
|
||||
_, _ = s.Every(5).Second().Do(func() { enqueueSubreddits(ctx, logger, statsd, db, []rmq.Queue{subredditQueue, trendingQueue}) })
|
||||
_, _ = s.Every(5).Second().Do(func() { enqueueUsers(ctx, logger, statsd, db, userQueue) })
|
||||
_, _ = s.Every(5).Second().Do(func() { cleanQueues(logger, queue) })
|
||||
|
|
Loading…
Reference in a new issue