Skip to content

Force unlock using either Redis or the API #21

Description

@ORESoftware

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!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions