mirror of
https://github.com/christianselig/apollo-backend
synced 2024-12-22 14:25:28 +00:00
change notification interval to 10 seconds
This commit is contained in:
parent
d6b967188c
commit
7582c90468
2 changed files with 5 additions and 5 deletions
|
@ -102,7 +102,7 @@ func SchedulerCmd(ctx context.Context) *cobra.Command {
|
|||
s := gocron.NewScheduler(time.UTC)
|
||||
s.SetMaxConcurrentJobs(8, gocron.WaitMode)
|
||||
|
||||
eaj, _ := s.Every(5).Seconds().Do(func() { enqueueAccounts(ctx, logger, statsd, db, redis, luaSha, notifQueue) })
|
||||
eaj, _ := s.Every(10).Seconds().Do(func() { enqueueAccounts(ctx, logger, statsd, db, redis, luaSha, notifQueue) })
|
||||
eaj.SingletonMode()
|
||||
|
||||
_, _ = s.Every(5).Seconds().Do(func() { enqueueSubreddits(ctx, logger, statsd, db, []rmq.Queue{subredditQueue, trendingQueue}) })
|
||||
|
|
|
@ -9,10 +9,10 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
NotificationCheckInterval = 5 * time.Second // time between notification checks
|
||||
NotificationCheckTimeout = 5 * time.Minute // time before we give up an account check lock
|
||||
StuckNotificationCheckInterval = 2 * time.Minute // time between stuck notification checks
|
||||
StaleTokenThreshold = 2 * time.Hour // time an oauth token has to be expired for to be stale
|
||||
NotificationCheckInterval = 10 * time.Second // time between notification checks
|
||||
NotificationCheckTimeout = 5 * time.Minute // time before we give up an account check lock
|
||||
StuckNotificationCheckInterval = 2 * time.Minute // time between stuck notification checks
|
||||
StaleTokenThreshold = 2 * time.Hour // time an oauth token has to be expired for to be stale
|
||||
)
|
||||
|
||||
// Account represents an account we need to periodically check in the notifications worker.
|
||||
|
|
Loading…
Reference in a new issue