python-etcd icon indicating copy to clipboard operation
python-etcd copied to clipboard

No way to get lock sequence number without exposing internals

Open garbled1 opened this issue 8 years ago • 0 comments

Need a function or similar to get the lock sequence number when acquiring a lock. If you want to do something like a shell script that utilizes the lock, you can't:

#!/bin/bash SEQ=$(take_lock.py) do_something_that_needs_locking release_lock.py -s ${SEQ}

Currently I do this by printing lock._sequence, but that is obviously bad form. Would like lock.get_sequence() or similar please.

garbled1 avatar Aug 11 '17 13:08 garbled1