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

Force unlock using either Redis or the API #21

Open
ORESoftware opened this issue Dec 31, 2016 · 0 comments
Open

Force unlock using either Redis or the API #21

ORESoftware opened this issue Dec 31, 2016 · 0 comments

Comments

@ORESoftware
Copy link

ORESoftware commented Dec 31, 2016

I have waited like 5 minutes, and the the TTL for a key was only 10 seconds at most, I have also restarted Redis for good measure. But still for a certain key, I get:

'TypeError: unlock is not a function'

I saw this issue:
#15

There really should be a documented way to force unlock a key, either using Redis directly or with the Warlock API. There are so many uses cases for that. I recommend this:

standard API:

warlock.lock(key, ttl, callback);
unlock(callback);

extended API:

warlock.lock(key, options, callback);
warlock.unlock(options, callback);

options should give you the ability to do:

force:true

also, I am working on this project

https://github.com/ORESoftware/live-mutex

it would be really awesome if you could try it and critique it. Your project is much faster. But mine is good for developers who need similar locking mechanism but cannot installed Redis. Any feedback would be appreciated, even if it's criticism, thanks!

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

No branches or pull requests

1 participant