send mail if debug on
This commit is contained in:
@@ -181,8 +181,10 @@ func (c *Config) Run() {
|
||||
for _, a := range cfg.apps {
|
||||
wg.Add(1)
|
||||
go func(app *App) {
|
||||
if err := app.Run(e.startTime); err != nil {
|
||||
if sched, err := app.Run(e.startTime); err != nil {
|
||||
e.AddItem(fmt.Sprintf(" - App : Error running %s (%s)", app.name, err))
|
||||
} else if *debug {
|
||||
e.AddItem(fmt.Sprintf(" - App : Success backing up %s (%s)", app.name, sched))
|
||||
}
|
||||
wg.Done()
|
||||
}(a)
|
||||
|
||||
Reference in New Issue
Block a user