You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started using the library and realized that it seems not working properly on concurrent requests.
I tested several scenarios, and it seems only to return the last command with the first result.
// in series, it works fine(async()=>{constredis=awaitconnect(config);for(constkeyofkeys){constval=awaitredis.get(key);console.log({ key, val });}/** * { key: "a", val: "a" } * { key: "b", val: "b" } * { key: "c", val: "c" } */})();
// get a wrong result(async()=>{constredis=awaitconnect(config);for(constkeyofkeys){redis.get(key).then(val=>{console.log({ key, val });});}/** * wrong output and only one * { key: "c", val: "a" } */})();
// no responses(async()=>{constredis=awaitconnect(config);constvalues=awaitPromise.all(keys.map(key=>redis.get(key)));console.log(values);// never reached})();
// get a wrong result(async()=>{constredis=awaitconnect(config);redis.get(keys[0]);constvalues=awaitredis.keys('*');console.log(values);// a})();
The text was updated successfully, but these errors were encountered:
I started using the library and realized that it seems not working properly on concurrent requests.
I tested several scenarios, and it seems only to return the last command with the first result.
The text was updated successfully, but these errors were encountered: