Skip to content

Commit

Permalink
scheduler_started expvar fix
Browse files Browse the repository at this point in the history
It should be set to 0 on start and always set to 0 on stop.
  • Loading branch information
Victor Castell committed Mar 29, 2019
1 parent 56801ae commit dc3ec41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dkron/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type Scheduler struct {

func NewScheduler() *Scheduler {
c := cron.New()
schedulerStarted.Set(1)
schedulerStarted.Set(0)
return &Scheduler{Cron: c, Started: false}
}

Expand Down Expand Up @@ -74,8 +74,8 @@ func (s *Scheduler) Stop() {
cronInspect.Do(func(kv expvar.KeyValue) {
kv.Value = nil
})
schedulerStarted.Set(0)
}
schedulerStarted.Set(0)
}

func (s *Scheduler) Restart(jobs []*Job) {
Expand Down

0 comments on commit dc3ec41

Please sign in to comment.