do not panic when agent was not configured
This commit is contained in:
parent
a854e410a5
commit
25caee9109
|
@ -7,6 +7,7 @@ package common
|
|||
import (
|
||||
"infini.sh/console/modules/agent/model"
|
||||
"infini.sh/framework/core/env"
|
||||
log "src/github.com/cihub/seelog"
|
||||
)
|
||||
|
||||
|
||||
|
@ -14,7 +15,7 @@ func GetAgentConfig() *model.AgentConfig {
|
|||
agentCfg := &model.AgentConfig{}
|
||||
_, err := env.ParseConfig("agent", agentCfg )
|
||||
if err != nil {
|
||||
panic(err)
|
||||
log.Error("agent config not found: %v", err)
|
||||
}
|
||||
return agentCfg
|
||||
}
|
Loading…
Reference in New Issue