Wait time control in config

This commit is contained in:
Richard Patel
2018-11-27 19:47:30 +01:00
parent b1bf59adef
commit e82768ff80
4 changed files with 21 additions and 5 deletions

View File

@@ -84,7 +84,7 @@ func cmdBase(_ *cli.Context) error {
if err != nil {
logrus.WithError(err).
Error("Failed to get new task")
time.Sleep(30 * time.Second)
time.Sleep(viper.GetDuration(ConfCooldown))
continue
}
if t == nil {
@@ -111,7 +111,7 @@ func cmdBase(_ *cli.Context) error {
} else if err != nil {
logrus.WithError(err).
Error("Failed to get new task")
time.Sleep(30 * time.Second)
time.Sleep(viper.GetDuration(ConfCooldown))
continue
}
ScheduleTask(inRemotes, t, &baseUri)