Skip to content
Snippets Groups Projects
Verified Commit d00c5eac authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

feat: allow specifying redis database

parent 5c46fb83
No related branches found
No related tags found
No related merge requests found
Pipeline #2801 passed
...@@ -17,6 +17,7 @@ type SizeDefinition struct { ...@@ -17,6 +17,7 @@ type SizeDefinition struct {
type RedisConfig struct { type RedisConfig struct {
Address string `yaml:"address"` Address string `yaml:"address"`
Password string `yaml:"password"` Password string `yaml:"password"`
Database int `yaml:"database"`
} }
type DatabaseConfig struct { type DatabaseConfig struct {
...@@ -55,5 +56,6 @@ func (config Config) AsynqOpts() asynq.RedisClientOpt { ...@@ -55,5 +56,6 @@ func (config Config) AsynqOpts() asynq.RedisClientOpt {
return asynq.RedisClientOpt{ return asynq.RedisClientOpt{
Addr: config.Redis.Address, Addr: config.Redis.Address,
Password: config.Redis.Password, Password: config.Redis.Password,
DB: config.Redis.Database,
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment