mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +00:00
get a separate redis connection for the queue itself
This commit is contained in:
parent
a441d2723e
commit
61dc3b558f
1 changed files with 7 additions and 1 deletions
|
@ -56,13 +56,19 @@ func WorkerCmd(ctx context.Context) *cobra.Command {
|
||||||
}
|
}
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
|
||||||
|
qredis, err := cmdutil.NewRedisClient(ctx, 4)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer qredis.Close()
|
||||||
|
|
||||||
redis, err := cmdutil.NewRedisClient(ctx, consumers)
|
redis, err := cmdutil.NewRedisClient(ctx, consumers)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer redis.Close()
|
defer redis.Close()
|
||||||
|
|
||||||
queue, err := cmdutil.NewQueueClient(logger, redis, "worker")
|
queue, err := cmdutil.NewQueueClient(logger, qredis, "worker")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue