Getting tasks

This commit is contained in:
Richard Patel
2018-11-16 04:47:08 +01:00
parent 3c39f0d621
commit 3f85cf679b
6 changed files with 77 additions and 65 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
"os"
"strings"
"time"
)
@@ -52,14 +53,15 @@ func readConfig() {
}
config.ServerUrl = viper.GetString(ConfServerUrl)
//if config.ServerUrl == "" {
// configMissing(ConfServerUrl)
//}
if config.ServerUrl == "" {
configMissing(ConfServerUrl)
}
config.ServerUrl = strings.TrimRight(config.ServerUrl, "/")
config.Token = viper.GetString(ConfToken)
//if config.Token == "" {
// configMissing(ConfToken)
//}
if config.Token == "" {
configMissing(ConfToken)
}
config.Retries = viper.GetInt(ConfRetries)
if config.Retries < 0 {