Comments (3)
maybe you want to get sync.Mutex
but redis can not do it....
it cat do
- retry
- timeout
from redsync.
perhaps you may try setting custom expiry and retryDelay to make the delay longer?
If you check the source code of this library, you may customise it like for example,
make the lock expiry time 180 seconds (default 8 seconds)
and try with linear retry for every 5 seconds (default is retrying every few random ms) and default max 32 retries
mutex := rs.NewMutex("YOUR-KEY", redsync.WithExpiry(180*time.Second), redsync.WithRetryDelay(5*time.Second))
from redsync.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from redsync.
Related Issues (20)
- I having difficulty using mutex's custom HOT 1
- all the goroutines can not get the lock HOT 1
- cannot unlock when use static value HOT 3
- Need a way to execute arbitrary redis commands on a connection from a `Pool` HOT 3
- Wrong error text for unsuccessful Unlock() HOT 9
- go-redis v9 support HOT 1
- Need a way to execute arbitrary redis commands on a connection from a `Pool` HOT 2
- pool not exported by package goredis HOT 1
- Multi instance usage HOT 4
- Im need to use retry func for simulate native go mutex? HOT 3
- does NewMutex() return an existing mutex or does it always recreate? HOT 1
- 1 error occurred: * node #0: EOF HOT 1
- lock already taken, locked nodes: [0] HOT 2
- Can never unlock with redis v9 HOT 1
- The method Unlock throws error when there aren't any locks HOT 10
- why does using go to concurrently lock repeatedly succeed HOT 1
- Return after getting the quorum HOT 1
- when i try lock,and get lock,finally i extend the lock;but extend return error. HOT 7
- Redsync distributed lock has not been effective. HOT 3
- What should be used to write / read data to Redis when using redsync? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redsync.