Skip to content

Commit

Permalink
refactor(BUX-411): forgot to use WithRedis only if it's configured
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-4chain committed Dec 19, 2023
1 parent ebc788a commit 1bbec0c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,12 @@ func splitBroadcastClientApis(apis []string) []broadcastclient.ArcClientConfig {
}

func loadTaskManager(appConfig *AppConfig, options []bux.ClientOps) []bux.ClientOps {
ops := []taskmanager.TasqOps{}
if appConfig.TaskManager.Factory == taskmanager.FactoryRedis {
ops = append(ops, taskmanager.WithRedis(appConfig.Cache.Redis.URL))
}
options = append(options, bux.WithTaskqConfig(
taskmanager.DefaultTaskQConfig(TaskManagerQueueName, taskmanager.WithRedis(appConfig.Cache.Redis.URL)),
taskmanager.DefaultTaskQConfig(TaskManagerQueueName, ops...),
))
return options
}
Expand Down

0 comments on commit 1bbec0c

Please sign in to comment.