question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add example script showing how to watch a key, run multiple commands as a transaction and catch any WatchError that occurs.

See original GitHub issue

Add an example script that shows how to watch a key and perform multiple commands on it in a transaction, catching any WatchError that occurs if the key changes.

Your example can be based on the code example here: https://github.com/redis/node-redis/blob/master/docs/isolated-execution.md, the best example to implement would be a check and set operation as described here https://redis.io/docs/manual/transactions/#cas

Name your file transaction-with-watch.js. Pay attention to the guidelines for adding an example to ensure that your contribution can be merged.

This is part of our participation in Hacktoberfest 2022. Learn how to complete this issue here: https://redis.io/community/hacktoberfest/

Need help or want to talk to us? Join us on Discord where we have a dedicated Hacktoberfest channel: https://discord.gg/ueQwKUh5Z3

If you’re interested in taking this issue on, please mention @simonprickett and @SuzeShardlow in the comments and ask to be assigned.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SuzeShardlowcommented, Oct 11, 2022

Hi @sailingwithsandeep, I’ve assigned this to you 😃 we look forward to receiving your PR in the next couple of days. Please check out our guidelines and have fun!

https://redis.io/community/hacktoberfest

1reaction
sailingwithsandeepcommented, Oct 11, 2022

Hello, I would love to work on this. @SuzeShardlow @simonprickett

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linux Watch Command - Examples And How to Use It
Linux watch command lets you repeatedly run a command or utility in regular time intervals. Learn how it works and what it can...
Read more >
4.3. Running Several Commands in Sequence - O'Reilly
Another rather simple solution is to type those commands into a file and then tell bash to execute the commands in the file—i.e.,...
Read more >
sewenew/redis-plus-plus: Redis client written in C++ - GitHub
First of all, you need to get the latest code of hiredis on master branch. ... a transaction. auto tx = redis.transaction(); //...
Read more >
c# - Sending several SQL commands in a single transaction
Finally, you can execute multiple SQL statements in a single command by appending ';' to each statement, if you must execute the entire...
Read more >
How to Use Redis With Python
In this step-by-step tutorial, you'll cover how to use both Redis and its Python client library. You'll learn a bite-sized slice of Redis...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found