Skip to content

Commit

Permalink
Added example of usage
Browse files Browse the repository at this point in the history
  • Loading branch information
avifenesh committed Mar 19, 2024
1 parent 00de035 commit a6d33ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions node/src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,10 @@ export class BaseClient {
* @param timeout - The `timeout` in seconds.
* @returns - An `array` containing the `key` from which the element was popped and the value of the popped element,
* formatted as [key, value]. If no element could be popped and the timeout expired, returns Null.
*
* @example
* await client.brpop(["list1", "list2"], 5);
* ["list1", "element"]
*/
public brpop(
keys: string[],
Expand Down
4 changes: 0 additions & 4 deletions node/tests/TestUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,6 @@ export function transactionTest(
args.push("OK");
baseTransaction.exists([key10]);
args.push(1);
baseTransaction.rename(key9, key10);
args.push("OK");
baseTransaction.exists([key10]);
args.push(1);
baseTransaction.rpush(key6, [field + "1", field + "2", field + "3"]);
args.push(3);
baseTransaction.brpop([key6], 0.1);
Expand Down

0 comments on commit a6d33ac

Please sign in to comment.