forked from forgejo/forgejo
Queue: Allow Redis to connect to unix
This commit is contained in:
parent
1013ced326
commit
1fb9104009
2 changed files with 9 additions and 3 deletions
|
@ -41,6 +41,7 @@ type RedisQueue struct {
|
|||
|
||||
// RedisQueueConfiguration is the configuration for the redis queue
|
||||
type RedisQueueConfiguration struct {
|
||||
Network string
|
||||
Addresses string
|
||||
Password string
|
||||
DBIndex int
|
||||
|
@ -88,6 +89,7 @@ func NewRedisQueue(handle HandlerFunc, cfg, exemplar interface{}) (Queue, error)
|
|||
return nil, errors.New("no redis host found")
|
||||
} else if len(dbs) == 1 {
|
||||
queue.client = redis.NewClient(&redis.Options{
|
||||
Network: config.Network,
|
||||
Addr: strings.TrimSpace(dbs[0]), // use default Addr
|
||||
Password: config.Password, // no password set
|
||||
DB: config.DBIndex, // use default DB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue