mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 04:34:23 -06:00
Merge branch 'master' of github.com:grafana/grafana
This commit is contained in:
commit
7ce33c31ec
@ -39,6 +39,9 @@ func (s *SchedulerImpl) Update(rules []*Rule) {
|
||||
|
||||
offset := ((rule.Frequency * 1000) / int64(len(rules))) * int64(i)
|
||||
job.Offset = int64(math.Floor(float64(offset) / 1000))
|
||||
if job.Offset == 0 { //zero offset causes division with 0 panics.
|
||||
job.Offset = 1
|
||||
}
|
||||
jobs[rule.Id] = job
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user