Skip to content

Commit

Permalink
Run contact fire cron every 30 secs
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Jan 28, 2025
1 parent 42d20df commit b9a149a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/tasks/contacts/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func NewFiresCron(fetchBatchSize, taskBatchSize int) *FiresCron {
}

func (c *FiresCron) Next(last time.Time) time.Time {
return tasks.CronNext(last, time.Minute)
return tasks.CronNext(last, 30*time.Second)
}

func (c *FiresCron) AllInstances() bool {
Expand Down Expand Up @@ -128,8 +128,8 @@ func (c *FiresCron) Run(ctx context.Context, rt *runtime.Runtime) (map[string]an
}
}

// if we're getting close to a minute, stop and let the next cron run handle the rest
if time.Since(start) > 50*time.Second {
// if we're getting close to the repeat schedule of this task, stop and let the next run pick up the rest
if time.Since(start) > 25*time.Second {
break
}
}
Expand Down

0 comments on commit b9a149a

Please sign in to comment.