We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6da7c08 commit 0083d7cCopy full SHA for 0083d7c
examples/README.md
@@ -5,6 +5,7 @@ This folder contains example scripts showing how to use Node Redis in different
5
| File Name | Description |
6
|--------------------------|--------------------------------------|
7
| `connect-as-acl-user.js` | Connect to Redis 6 using an ACL user |
8
+| `blocking-list-pop.js` | Block isolated execution till element is pushed to list |
9
10
## Contributing
11
examples/blocking-list-pop.js
@@ -15,10 +15,11 @@ async function blockingListPop() {
15
16
const blpopPromise = client.blPop(
17
commandOptions({ isolated: true }),
18
- keyName
+ keyName,
19
+ 0
20
);
21
- await client.LPUSH(keyName, 'value');
22
+ await client.lPush(keyName, 'value');
23
24
await blpopPromise;
25
0 commit comments