Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 completely broke several connections to single redis #61

Open
a-parser opened this issue Jun 18, 2021 · 2 comments
Open

v2 completely broke several connections to single redis #61

a-parser opened this issue Jun 18, 2021 · 2 comments

Comments

@a-parser
Copy link

Just abstract example:

(async f1() {
  const client1 = asyncRedis.createClient();
  await client1.blpop("some", 0);
})()

(async f2() {
  const client2 = asyncRedis.createClient();
  await client2.lpush("some", 42); 
})()

f2's lpush will never be called as client1 and client2 share same connection due to new implementation

@micalevisk
Copy link

duplicated of #60 :p

@micalevisk
Copy link

micalevisk commented Sep 6, 2021

an workaround:

(async f1() {
  const client1 = asyncRedis.createClient({ _id: 1 });
  await client1.blpop("some", 0);
})()

(async f2() {
  const client2 = asyncRedis.createClient({ _id: 2 });
  await client2.lpush("some", 42); 
})()

you must pass different options for each client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants