Reload job in ui

This commit is contained in:
bel
2020-03-15 23:04:48 +00:00
parent 0971908da7
commit fd71221cbf
12 changed files with 275 additions and 93 deletions

View File

@@ -14,17 +14,14 @@ import (
)
func main() {
var err error
s := scheduler.New()
if config.Config != "" {
var err error
s, err = scheduler.NewFromFile(config.Config)
scheduler.Schedule, err = scheduler.NewFromFile(config.Config)
if err != nil {
panic(err)
}
}
err = s.Start()
if err != nil {
if err := scheduler.Schedule.Start(); err != nil {
panic(err)
}
@@ -46,7 +43,7 @@ func main() {
stop := make(chan os.Signal)
signal.Notify(stop, os.Interrupt)
<-stop
s.Stop()
scheduler.Schedule.Stop()
}
func EnqueueBackups() {