mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
remove try set informer backend
This commit is contained in:
@@ -233,6 +233,7 @@ func (manager *SEndpointManager) SetEtcdInformerBackend(ep *SEndpoint) error {
|
||||
return errors.Wrap(err, "new etcd informer backend")
|
||||
}
|
||||
informer.Set(be)
|
||||
log.Infof("Informer set etcd backend success")
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -631,13 +632,3 @@ func (endpoint *SEndpoint) ValidateUpdateData(
|
||||
}
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func TrySetInformerBackend() {
|
||||
endpoint, err := EndpointManager.FetchByName(nil, apis.SERVICE_TYPE_ETCD)
|
||||
if err != nil {
|
||||
log.Errorf("Failed fetch etcd service endpoint: %s", err)
|
||||
return
|
||||
}
|
||||
ep := endpoint.(*SEndpoint)
|
||||
ep.trySetInformerBackend()
|
||||
}
|
||||
|
||||
@@ -70,7 +70,6 @@ func StartService() {
|
||||
|
||||
InitHandlers(app)
|
||||
db.EnsureAppInitSyncDB(app, &opts.DBOptions, models.InitDB)
|
||||
models.TrySetInformerBackend()
|
||||
|
||||
app_common.InitBaseAuth(&opts.BaseOptions)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user