-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force unlock #15
Comments
Hi Brandon, By design only the owner of the lock should be able to release it. I'm dubious that any other pattern is appropriate but I would like to hear why you feel this is necessary? |
One problem I have is rebooting the server. On reboot the function is still On Monday, November 9, 2015, Geoff Wagstaff notifications@github.com
[image: Giftnix] Brandon Copley Founder & CEO t: 512.784.6060 |
Ideally, your process would have some sort of shut down procedure where it finishes its work and releases the lock before exiting. I appreciate that this isn't always possible though. Other than that, you can rely on the lock timeouts to release the lock so that when your app boots up again it can eventually obtain the lock. |
Hello, I think it would be usefull feature for some cases if warlock returns the lock id in .lock callback. For example, In our system we are going to develop such workflow for collaborative text editor:
So for this flow the lock TTL depends on how long first user will interact with text via client GUI and when it finishes we need to release the lock immediately. |
Hi @calibr, thank you for detailing that use case. It makes sense to know the lock ID there. Perhaps it could be set as a property of the unlock function, or passed as an additional argument to the lock callback. |
thanks, I'm going to submit a pull request for this in few days |
@calibr that would be much appreciated 👍 |
I would like to be able to force an unlock even if I don't know the id, is this possible?
The text was updated successfully, but these errors were encountered: