Skip to content

Commit

Permalink
Add config section for asset.manager
Browse files Browse the repository at this point in the history
Currently only contains retry configuration.

Signed-off-by: Andrew Richardson <[email protected]>
  • Loading branch information
awrichar committed Sep 27, 2021
1 parent 18d13bd commit 598a5c3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 3 additions & 3 deletions internal/assets/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ func NewAssetManager(ctx context.Context, di database.Plugin, ii identity.Plugin
syncasync: sa,
tokens: ti,
retry: retry.Retry{
InitialDelay: config.GetDuration(config.EventAggregatorRetryInitDelay),
MaximumDelay: config.GetDuration(config.EventAggregatorRetryMaxDelay),
Factor: config.GetFloat64(config.EventAggregatorRetryFactor),
InitialDelay: config.GetDuration(config.AssetManagerRetryInitialDelay),
MaximumDelay: config.GetDuration(config.AssetManagerRetryMaxDelay),
Factor: config.GetFloat64(config.AssetManagerRetryFactor),
},
txhelper: txcommon.NewTransactionHelper(di),
}
Expand Down
11 changes: 10 additions & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,13 @@ var (
// SubscriptionsRetryMaxDelay is the initial retry delay
SubscriptionsRetryMaxDelay = rootKey("subscription.retry.maxDelay")
// SubscriptionsRetryFactor the backoff factor to use for retry of database operations
SubscriptionsRetryFactor = rootKey("event.dispatcher.retry.factor")
SubscriptionsRetryFactor = rootKey("subscription.retry.factor")
// AssetManagerRetryInitialDelay is the initial retry delay
AssetManagerRetryInitialDelay = rootKey("asset.manager.retry.initDelay")
// AssetManagerRetryMaxDelay is the initial retry delay
AssetManagerRetryMaxDelay = rootKey("asset.manager.retry.maxDelay")
// AssetManagerRetryFactor the backoff factor to use for retry of database operations
AssetManagerRetryFactor = rootKey("asset.manager.retry.factor")
// UIEnabled set to false to disable the UI (default is true, so UI will be enabled if ui.path is valid)
UIEnabled = rootKey("ui.enabled")
// UIPath the path on which to serve the UI
Expand Down Expand Up @@ -322,6 +328,9 @@ func Reset() {
viper.SetDefault(string(SubscriptionsRetryInitialDelay), "250ms")
viper.SetDefault(string(SubscriptionsRetryMaxDelay), "30s")
viper.SetDefault(string(SubscriptionsRetryFactor), 2.0)
viper.SetDefault(string(AssetManagerRetryInitialDelay), "250ms")
viper.SetDefault(string(AssetManagerRetryMaxDelay), "30s")
viper.SetDefault(string(AssetManagerRetryFactor), 2.0)
viper.SetDefault(string(UIEnabled), true)
viper.SetDefault(string(ValidatorCacheSize), "1Mb")
viper.SetDefault(string(ValidatorCacheTTL), "1h")
Expand Down

0 comments on commit 598a5c3

Please sign in to comment.