Skip to content
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

Support Freeing Locks held beyond some threshhold #39

Open
vcase opened this issue Jul 6, 2018 · 4 comments
Open

Support Freeing Locks held beyond some threshhold #39

vcase opened this issue Jul 6, 2018 · 4 comments

Comments

@vcase
Copy link

vcase commented Jul 6, 2018

We have forked this resource to support a "max_minutes" attribute used to (unceremoniously) move claimed locks back to unclaimed if it is held for longer than this threshold. Perhaps this would be a desirable feature in the standard resource. We perform this clean-up as follows

1- Perform cleanup from "check" since the ATC runs only a single instance of this at a time
2- Check the timestamp of the last commit that touched this lock
3- If the max_minutes threshold is exceeded, unclaim the lock
3b- If the "unclaim" operation fails due to a (very possible) conflict, do not retry until the next check (to keep check running relatively quickly)

@marco-m
Copy link
Contributor

marco-m commented Oct 17, 2018

For people with this need (detect and release stale locks after a timeout), you might want to have a look at our Pool Boy https://github.com/Pix4D/concourse-pool-boy, which is meant to run as a separate pipeline.

@lxiaopei
Copy link

Seem https://github.com/Pix4D/concourse-pool-boy git repo is no longer there, is it still available?I need to regularly detect stale locks and release them. Thanks.

@marco-m
Copy link
Contributor

marco-m commented Aug 24, 2020

hello @lxiaopei, I think we made that repo private by mistake. I am checking it. Feel free to ping in a few days if I don't answer.

@marco-m
Copy link
Contributor

marco-m commented Sep 15, 2020

The repo https://github.com/Pix4D/concourse-pool-boy is again public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants