-
Notifications
You must be signed in to change notification settings - Fork 1.9k
redis client legacy v4 API uses callbacks instead of promises #2398
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
Labels
Comments
I'm actually not sure why the tests didn't catch this, checking now... Sorry about that. |
The tests only tested |
leibale
added a commit
to leibale/node-redis
that referenced
this issue
Jan 30, 2023
leibale
added a commit
that referenced
this issue
Jan 30, 2023
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Using @redis/client with legacy mode, I can no longer access the v4 promise API.
Calling set or get function under v4 gives me callback functions.
` const client = createClient({ legacyMode: true });
client.on('error', err => console.log('Redis Client Error', err));
// @ts-ignore
await client.connect();
await client.v4.set('key', 'value', () => { console.log('callback') });
const value = await client.v4.get('key');
console.log('test value', value);
client.v4.get('key', (err, val) => { console.log('callback get', err, val); }
// @ts-ignore
await client.disconnect();`
Node.js Version
18.11
Redis Server Version
7.0.5
Node Redis Version
@redis/client 1.5.4
Platform
macOS
Logs
No response
The text was updated successfully, but these errors were encountered: