@@ -46,11 +46,16 @@ var BuiltinCoreID = coreconf.Config.ID
4646
4747var Coordinator ProvidersCoordinator
4848
49- func newCoordinator () * coordinator {
49+ func newCoordinator (globalAutoUpdateCfg UpdateProvidersConfig ) * coordinator {
50+ log .Debug ().
51+ Bool ("global auto-update is enabled" , globalAutoUpdateCfg .Enabled ).
52+ Msg ("providers.newCoordinator() is called" )
53+
5054 c := & coordinator {
51- runningByID : map [string ]* RunningProvider {},
52- runtimes : map [string ]* Runtime {},
53- schema : newExtensibleSchema (),
55+ runningByID : map [string ]* RunningProvider {},
56+ runtimes : map [string ]* Runtime {},
57+ schema : newExtensibleSchema (),
58+ autoUpdateConfig : globalAutoUpdateCfg ,
5459 }
5560 c .schema .coordinator = c
5661 return c
@@ -68,6 +73,7 @@ type coordinator struct {
6873 runtimeCnt int
6974 mutex sync.Mutex
7075 schema extensibleSchema
76+ autoUpdateConfig UpdateProvidersConfig
7177}
7278
7379type builtinProvider struct {
@@ -108,9 +114,7 @@ func (c *coordinator) newRuntime() *Runtime {
108114 providers : map [string ]* ConnectedProvider {},
109115 recording : recording.Null {},
110116 shutdownTimeout : defaultShutdownTimeout ,
111- AutoUpdate : UpdateProvidersConfig {
112- Enabled : true ,
113- },
117+ AutoUpdate : c .autoUpdateConfig ,
114118 }
115119
116120 c .mutex .Lock ()
@@ -245,6 +249,11 @@ func (c *coordinator) RemoveRuntime(runtime *Runtime) {
245249}
246250
247251func (c * coordinator ) GetRunningProvider (id string , update UpdateProvidersConfig ) (* RunningProvider , error ) {
252+ log .Debug ().
253+ Str ("id" , id ).
254+ Bool ("update is enabled" , update .Enabled ).
255+ Msg ("coordinator.GetRunningProvider() is called" )
256+
248257 c .mutex .Lock ()
249258 defer c .mutex .Unlock ()
250259 running := c .runningByID [id ]
0 commit comments