retry_times set to 0 always fails to acquire a lock
I recently tried setting retry_times to 0 to have RedLock not retry on its own and my locks always failed to acquire. I realized that this option must be at least 1 as it is not the number of retries but the number of tries.
I suggest either changing the loop for acquiring to add 1 to retry_times to make the name make more sense or to raise an exception if retry_times is <= 0 in RedLock.init() so that this incorrect condition cannot happen.
+1
Is this issue solved in this commit https://github.com/glasslion/redlock/commit/56dc4316f83440cb2befa74b8dffc9d5635195a8 ? If so, should this issue be closed?
@glasslion Is this project abandoned?
Is this issue solved in this commit 56dc431 ? If so, should this issue be closed?
The issue has been solved in the repository, but not deployed on the latest PyPI package (1.2.0).
We can make a simple wrapper that adds 1 to retry_times though.