Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
simonprickett opened this issue Oct 4, 2022 · 6 comments
Assignees

Comments

@simonprickett
Copy link
Contributor

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.

@rowantrollope
Copy link
Contributor

I would like to work on this. @simonprickett @SuzeShardlow can you assign it to me?

@simonprickett
Copy link
Contributor Author

@rowantrollope I've assigned this to you, looking forward to seeing your PR in the next couple of days. Have fun and please check out our guidelines:

https://redis.io/community/hacktoberfest/

@SuzeShardlow
Copy link
Contributor

Hi @rowantrollope, how are you doing with this? :)

@simonprickett
Copy link
Contributor Author

This issue is available to work on.

@sailingwithsandeep
Copy link
Contributor

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

@SuzeShardlow
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants