Skip to content

Trying to understand the typeof RedisConnection signature on Queue constructor #1108

Answered by manast
prescience-data asked this question in Q&A
Discussion options

You must be logged in to vote

The documentation is correct, you do not need to use the third argument, that is only used for implementing extensions that need different features than the ones provided by the standard RedisConnection class. You just need to pass an existing redis client as connection and then the class will reuse it as much as it can:

const connection = new Redis();
const queue = new Queue('myqueue', { connection });

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by prescience-data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants