aiozk icon indicating copy to clipboard operation
aiozk copied to clipboard

In recipes - add option to create non-ephemeral or ephemeral nodes

Open nonspher opened this issue 7 years ago • 1 comments

Hello! Could We add option to create non-ephemeral or ephemeral nodes into Recipes(Lock, SharedLock)? Like in kazoo https://github.com/python-zk/kazoo/blob/master/kazoo/recipe/lock.py#LC129 I can do it

nonspher avatar May 29 '18 15:05 nonspher

@nonspher I'm not against, but personally, I don't see too much sense in having non-ephemeral locks for most cases. For example, if some process just dies, you will have basically deadlock. From my point of view, it is better not to push bad design decisions. If someone needs it is really easy to subclass lock and make it explicit.

If you want to implement it, feel free to make PR + tests.

cybergrind avatar Jun 05 '18 20:06 cybergrind