Skip to content

Commit

Permalink
✨ handle auto update configuration for providers (#1953)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev authored Sep 27, 2023
1 parent c2c4003 commit ad86f0b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cli/providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,13 @@ func setConnector(provider *plugin.Provider, connector *plugin.Connector, run fu
// TODO: add flag to set timeout and then use RuntimeWithShutdownTimeout
runtime := providers.Coordinator.NewRuntime()

// TODO: read from config
autoUpdate := true
if viper.IsSet("auto_update") {
autoUpdate = viper.GetBool("auto_update")
}

runtime.AutoUpdate = providers.UpdateProvidersConfig{
Enabled: true,
Enabled: autoUpdate,
RefreshInterval: 60 * 60,
}

Expand Down

0 comments on commit ad86f0b

Please sign in to comment.