The cron actor now respects --fast-timing
This commit is contained in:
4
cron.go
4
cron.go
@@ -7,6 +7,7 @@ import "context"
|
||||
// tasks on time intervals.
|
||||
type cron struct {
|
||||
trimFunc func() bool
|
||||
fastTiming bool
|
||||
timing struct {
|
||||
trimInterval time.Duration
|
||||
}
|
||||
@@ -28,6 +29,9 @@ func (this *cron) Configure (config Config) error {
|
||||
}
|
||||
this.timing.trimInterval = value
|
||||
}
|
||||
if this.fastTiming {
|
||||
this.timing.trimInterval = time.Second * 10
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user