microfleet / ioredis-lock

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

getAcquiredLocks() does not take timeout into account #6

Closed aabrams closed 8 years ago

aabrams commented 8 years ago

I created a lock with a timeout of 3000 milis. Does that not mean the lock should be released automatically after 3 seconds? If so, why does it show indefinitely in the acquiredLocks list?

AVVS commented 8 years ago

it wont be released automatically, however, notion of this lock in the database will be lost (based on ttl). You should either call extend or release. In the latter case it will fail after 3s