mirror of https://github.com/statping/statping
postgres fix
parent
268108c409
commit
c6a965e140
|
@ -33,7 +33,7 @@ type ErrorResponse struct {
|
||||||
func LoadConfigFile(directory string) (*DbConfig, error) {
|
func LoadConfigFile(directory string) (*DbConfig, error) {
|
||||||
var configs *DbConfig
|
var configs *DbConfig
|
||||||
|
|
||||||
dbConn := utils.Getenv("DB_CONN", "")
|
dbConn := utils.Getenv("DB_CONN", "").(string)
|
||||||
|
|
||||||
if dbConn != "" {
|
if dbConn != "" {
|
||||||
log.Infof("DB_CONN=%s environment variable was found, waiting for database...", dbConn)
|
log.Infof("DB_CONN=%s environment variable was found, waiting for database...", dbConn)
|
||||||
|
|
|
@ -90,7 +90,7 @@ func Getenv(key string, defaultValue interface{}) interface{} {
|
||||||
var services []*types.Service
|
var services []*types.Service
|
||||||
if err := json.Unmarshal([]byte(val), services); err != nil {
|
if err := json.Unmarshal([]byte(val), services); err != nil {
|
||||||
Log.Error("Incorrect formatting with SERVICE environment variable")
|
Log.Error("Incorrect formatting with SERVICE environment variable")
|
||||||
return nil
|
return []*types.Service{}
|
||||||
}
|
}
|
||||||
return services
|
return services
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue