Review config file structure and improve worker pool

This commit is contained in:
CrazyMax
2019-06-28 17:07:20 +02:00
parent 3450fd425d
commit 889f595523
12 changed files with 283 additions and 303 deletions

View File

@@ -67,10 +67,6 @@ func main() {
if err != nil {
log.Fatal().Err(err).Msg("Cannot load configuration")
}
if err := cfg.Check(); err != nil {
cfg.Display()
log.Fatal().Err(err).Msg("Improper configuration")
}
cfg.Display()
// Init
@@ -85,7 +81,7 @@ func main() {
// Start scheduler
c = cron.NewWithLocation(location)
log.Info().Msgf("Watcher initialized with schedule %s", cfg.Watch.Schedule)
log.Info().Msgf("Cron initialized with schedule %s", cfg.Watch.Schedule)
if err := c.AddJob(cfg.Watch.Schedule, diun); err != nil {
log.Fatal().Err(err).Msg("Cannot create cron task")
}