Skip to content

Commit

Permalink
remove notification config from api
Browse files Browse the repository at this point in the history
  • Loading branch information
almostinf committed Nov 3, 2023
1 parent fd3429d commit e509234
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 20 deletions.
7 changes: 0 additions & 7 deletions cmd/api/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ type config struct {
Remote cmd.RemoteConfig `yaml:"remote"`
Prometheus cmd.PrometheusConfig `yaml:"prometheus"`
NotificationHistory cmd.NotificationHistoryConfig `yaml:"notification_history"`
Notification cmd.NotificationConfig `yaml:"notification"`
}

type apiConfig struct {
Expand Down Expand Up @@ -115,12 +114,6 @@ func getDefault() config {
NotificationHistoryTTL: "48h",
NotificationHistoryQueryLimit: int(notifier.NotificationsLimitUnlimited),
},
Notification: cmd.NotificationConfig{
DelayedTime: "1m",
TransactionTimeout: "200ms",
TransactionMaxRetries: 10,
TransactionHeuristicLimit: 10000,
},
Logger: cmd.LoggerConfig{
LogFile: "stdout",
LogLevel: "info",
Expand Down
6 changes: 0 additions & 6 deletions cmd/api/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ func Test_webConfig_getDefault(t *testing.T) {
NotificationHistoryTTL: "48h",
NotificationHistoryQueryLimit: -1,
},
Notification: cmd.NotificationConfig{
DelayedTime: "1m",
TransactionTimeout: "200ms",
TransactionMaxRetries: 10,
TransactionHeuristicLimit: 10000,
},
}

result := getDefault()
Expand Down
3 changes: 1 addition & 2 deletions cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ func main() {

databaseSettings := applicationConfig.Redis.GetSettings()
notificationHistorySettings := applicationConfig.NotificationHistory.GetSettings()
notificationSettings := applicationConfig.Notification.GetSettings()
database := redis.NewDatabase(logger, databaseSettings, notificationHistorySettings, notificationSettings, redis.API)
database := redis.NewDatabase(logger, databaseSettings, notificationHistorySettings, redis.NotificationConfig{}, redis.API)

// Start Index right before HTTP listener. Fail if index cannot start
searchIndex := index.NewSearchIndex(logger, database, telemetry.Metrics)
Expand Down
5 changes: 0 additions & 5 deletions local/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ web:
notification_history:
ttl: 48h
query_limit: 10000
notification:
delayed_time: 1m
transaction_timeout: 200ms
transaction_max_retries: 10
transaction_heuristic_limit: 10000
log:
log_file: stdout
log_level: debug
Expand Down

0 comments on commit e509234

Please sign in to comment.