Move jobs raw definition to their own namespace and the cascading fallout

This commit is contained in:
Bel LaPointe
2020-04-24 09:52:34 -06:00
parent 84400e4401
commit f7a346a380
7 changed files with 84 additions and 35 deletions

View File

@@ -226,7 +226,10 @@ func (s *Scheduler) Remove(j *Job) error {
if was == is {
return ErrJobNotFound
}
return config.Store.Set(j.Name, nil, ns.Jobs...)
if err := config.Store.Set(j.Name, nil, ns.Jobs...); err != nil {
return err
}
return config.Store.Set(j.Name, nil, ns.JobsRaw...)
}
func (s *Scheduler) getEntry(j *Job) (cron.EntryID, bool) {