You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
chore(examples): fix examples for v5 (#2938)
This commit is contained in:
committed by
GitHub
parent
bd5c230c62
commit
2c9ad2e772
@@ -4,16 +4,15 @@
|
||||
// The script will be blocked until the LPUSH command is executed.
|
||||
// After which we log the list and quit the client.
|
||||
|
||||
import { createClient, commandOptions } from 'redis';
|
||||
import { createClientPool } from 'redis';
|
||||
|
||||
const client = createClient();
|
||||
const client = createClientPool();
|
||||
|
||||
await client.connect();
|
||||
|
||||
const keyName = 'keyName';
|
||||
|
||||
const blpopPromise = client.blPop(
|
||||
commandOptions({ isolated: true }),
|
||||
keyName,
|
||||
0
|
||||
);
|
||||
|
Reference in New Issue
Block a user