microfleet / ioredis-lock

Node distributed locking using redis
MIT License
26 stars 8 forks source link

Allow supplying string ID instead of autogenerated UUID for lock creation #4

Closed aabrams closed 8 years ago

aabrams commented 8 years ago

For several use cases, I need to use the lock value in addition to the lock key.

One example is a version of a document I'm locking... I need to know if the lock is held by an earlier or later version (I need acquire to return this upon failure).

Is that supported somehow?