We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
the unlock method returns NoMethodError: undefined method '[]' for false:FalseClass
NoMethodError: undefined method '[]' for false:FalseClass
my code lock_manager = Redlock::Client.new(REDIS_LOCKING[:servers]) lock_info = lock_manager.lock(retailer_id.to_s, REDIS_LOCKING[:ttl]) ..... lock_manager.unlock(lock_info)
lock_manager = Redlock::Client.new(REDIS_LOCKING[:servers])
lock_info = lock_manager.lock(retailer_id.to_s, REDIS_LOCKING[:ttl])
.....
lock_manager.unlock(lock_info)
error from sentry
The text was updated successfully, but these errors were encountered:
Hey @Hammam94 I think it's because your fist attempt to acquire the lock have failed.
lock_manager = Redlock::Client.new(REDIS_LOCKING[:servers]) lock_info = lock_manager.lock(retailer_id.to_s, REDIS_LOCKING[:ttl]) # your lock_info might be `false` instead of `{validity: 1987, resource: "resource_key", value: "generated_uuid4"}` ..... lock_manager.unlock(lock_info)
You can not assume that you will get lock in any point.
Sorry, something went wrong.
No branches or pull requests
the unlock method returns
NoMethodError: undefined method '[]' for false:FalseClass
my code
lock_manager = Redlock::Client.new(REDIS_LOCKING[:servers])
lock_info = lock_manager.lock(retailer_id.to_s, REDIS_LOCKING[:ttl])
.....
lock_manager.unlock(lock_info)
error from sentry
The text was updated successfully, but these errors were encountered: