-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add Consul-based locking #17
Comments
Am I right in assuming this and #20 wouldn't work with |
I think we support Consul-locking with I agree it's probably unusual to use both together, but I think let's not introduce the code complexity of banning this. |
I have given more thoughts to this / started implementing it and I feel weird acquiring a lock never to release it. I'd rather just not lock in case of async and emit a warning or something like that. |
Also since, there are no names associated with the playbook, we can either lock based on:
What do you think? I personally like 2 best. |
Fine by me on the --async - I suggest we warn or error out, up to you. On the lock name - what does SQL Runner do? |
AFAICT, @jbeemster might able to weigh in here, SQL runner uses the path provided by the command line arg I was thinking of abstracting this away from the user without any lock-related command line args. |
I don't think that gives enough control. For example, one user might want to enforce a lock based on just the job name, while another company might want to enforce a single lock across two different jobs which both target the same database (risking a race condition if they run at the same time). I'd go with @jbeemster's design - it's simple and flexible... |
This lets us run specific jobs as singletons, to prevent overlapping runs.
SQL Runner has an implementation of this that we can borrow.
The text was updated successfully, but these errors were encountered: