Skip to content

Commit

Permalink
Update src/test/java/io/redis/examples/PipeTransExample.java
Browse files Browse the repository at this point in the history
Co-authored-by: M Sazzadul Hoque <[email protected]>
  • Loading branch information
andy-stark-redis and sazzad16 authored Dec 6, 2024
1 parent 56dae15 commit 6fb4dbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/java/io/redis/examples/PipeTransExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ public void run() {
jedis.set("shellpath", "/usr/syscmds/");

// Start the transaction and watch the key we are about to update.
trans = jedis.multi();
trans.watch("shellpath");
trans = jedis.transaction(false); // create a Transaction object without sending MULTI command
trans.watch("shellpath"); // send WATCH command(s)
trans.multi(); // send MULTI command

String currentPath = jedis.get("shellpath");
String newPath = currentPath + ":/usr/mycmds/";
Expand Down

0 comments on commit 6fb4dbb

Please sign in to comment.