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
Copy file name to clipboardExpand all lines: node/src/BaseClient.ts
+35-2Lines changed: 35 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ import {
21
21
StreamReadOptions,
22
22
StreamTrimOptions,
23
23
ZaddOptions,
24
+
createBlpop,
24
25
createBrpop,
25
26
createDecr,
26
27
createDecrBy,
@@ -2190,13 +2191,16 @@ export class BaseClient {
2190
2191
* with the given keys being checked in the order that they are given.
2191
2192
* Blocks the connection when there are no elements to pop from any of the given lists.
2192
2193
* See https://redis.io/commands/brpop/ for more details.
2193
-
* Note: BRPOP is a blocking command,
2194
+
*
2195
+
* Notes:
2196
+
* 1. `BRPOP` is a blocking command,
2194
2197
* see [Blocking Commands](https://github.com/aws/glide-for-redis/wiki/General-Concepts#blocking-commands) for more details and best practices.
2198
+
* 2. When in cluster mode, all `keys` must map to the same `hash slot`.
2195
2199
*
2196
2200
* @param keys - The `keys` of the lists to pop from.
2197
2201
* @param timeout - The `timeout` in seconds.
2198
2202
* @returns - An `array` containing the `key` from which the element was popped and the value of the popped element,
2199
-
* formatted as [key, value]. If no element could be popped and the timeout expired, returns Null.
2203
+
* formatted as [key, value]. If no element could be popped and the timeout expired, returns `null`.
* Pop an element from the head of the first list that is non-empty,
2221
+
* with the given `keys` being checked in the order that they are given.
2222
+
* Blocks the connection when there are no elements to pop from any of the given lists.
2223
+
* See https://redis.io/commands/blpop/ for more details.
2224
+
*
2225
+
* Notes:
2226
+
* 1. `BLPOP` is a blocking command,
2227
+
* see [Blocking Commands](https://github.com/aws/glide-for-redis/wiki/General-Concepts#blocking-commands) for more details and best practices.
2228
+
* 2. When in cluster mode, all `keys` must map to the same `hash slot`.
2229
+
*
2230
+
* @param keys - The `keys` of the lists to pop from.
2231
+
* @param timeout - The `timeout` in seconds.
2232
+
* @returns - An `array` containing the `key` from which the element was popped and the value of the popped element,
2233
+
* formatted as [key, value]. If no element could be popped and the timeout expired, returns `null`.
2234
+
*
2235
+
* @example
2236
+
* ```typescript
2237
+
* const result = await client.blpop(["list1", "list2"], 5);
Copy file name to clipboardExpand all lines: node/src/Transaction.ts
+20-2Lines changed: 20 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ import {
14
14
StreamReadOptions,
15
15
StreamTrimOptions,
16
16
ZaddOptions,
17
+
createBlpop,
17
18
createBrpop,
18
19
createClientGetName,
19
20
createClientId,
@@ -1243,18 +1244,35 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
1243
1244
* with the given keys being checked in the order that they are given.
1244
1245
* Blocks the connection when there are no elements to pop from any of the given lists.
1245
1246
* See https://redis.io/commands/brpop/ for more details.
1246
-
* Note: BRPOP is a blocking command,
1247
+
* Note: `BRPOP` is a blocking command,
1247
1248
* see [Blocking Commands](https://github.com/aws/glide-for-redis/wiki/General-Concepts#blocking-commands) for more details and best practices.
1248
1249
*
1249
1250
* @param keys - The `keys` of the lists to pop from.
1250
1251
* @param timeout - The `timeout` in seconds.
1251
1252
* Command Response - An `array` containing the `key` from which the element was popped and the value of the popped element,
1252
-
* formatted as [key, value]. If no element could be popped and the timeout expired, returns Null.
1253
+
* formatted as [key, value]. If no element could be popped and the timeout expired, returns `null`.
* Pop an element from the head of the first list that is non-empty,
1261
+
* with the given `keys` being checked in the order that they are given.
1262
+
* Blocks the connection when there are no elements to pop from any of the given lists.
1263
+
* See https://redis.io/commands/blpop/ for more details.
1264
+
* Note: `BLPOP` is a blocking command,
1265
+
* see [Blocking Commands](https://github.com/aws/glide-for-redis/wiki/General-Concepts#blocking-commands) for more details and best practices.
1266
+
*
1267
+
* @param keys - The `keys` of the lists to pop from.
1268
+
* @param timeout - The `timeout` in seconds.
1269
+
* Command Response - An `array` containing the `key` from which the element was popped and the value of the popped element,
1270
+
* formatted as [key, value]. If no element could be popped and the timeout expired, returns `null`.
0 commit comments