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

Queue kinds #17

Merged
merged 3 commits into from Feb 3, 2020
Merged

Queue kinds #17

merged 3 commits into from Feb 3, 2020

Conversation

@ltratt
Copy link
Member

ltratt commented Jan 31, 2020

This PR adds queue kinds: queue = <evict|parallel|sequential>. Previously parallel was all we supported, which had some comic outcomes: for example, for yksom, you could get race conditions trying to force push the gh-pages branch. sequential is now the default. Hopefully the README explains why these exist and why they might be useful.

This is the last major feature I think we need before a 0.1 release (though there are a few minor bits that probably need doing).

@@ -235,7 +235,7 @@ impl JobRunner {
// Should we check the queue? This could be because we were previously unable to empty
// it fully, or because the HTTP server has told us that it's put more jobs there.
// However, it's only worth us checking the queue (which requires a lock) if there's
// space for us to run further jobs.
// space for us to run further jobs. Note that this check *must* come after

This comment has been minimized.

Copy link
@vext01

vext01 Feb 3, 2020

Member

Is that a partial comment, or does it just need a full-stop?

This comment has been minimized.

Copy link
@ltratt

ltratt Feb 3, 2020

Author Member

Oops, I got half way through writing this, and realised I could solve the problem another way. So this is now misleading. Removed in caadd49.

@vext01

This comment has been minimized.

Copy link
Member

vext01 commented Feb 3, 2020

This LGTM.

Please squash and we can test if bors is feeling better today.

ltratt added 3 commits Jan 31, 2020
For any given repository R, snare previously ran all requests in parallel if
possible. This commit allows jobs to be run in parallel or sequentially (with
the latter being the default). "Sequentially" means "only run one job per
repository at a time": other jobs will be left on the queue and popped in FIFO
order when one has finished.
This is useful for things like website building, where there's no point having a
long list of jobs on the queue: only the most recent job is worth executing.
Note that 'evict' only removes jobs from the queue: it does not affect running
jobs.
@ltratt ltratt force-pushed the ltratt:queue_types branch from caadd49 to f71b153 Feb 3, 2020
@ltratt

This comment has been minimized.

Copy link
Member Author

ltratt commented Feb 3, 2020

Squashed.

@vext01

This comment has been minimized.

Copy link
Member

vext01 commented Feb 3, 2020

bors r+

bors bot added a commit that referenced this pull request Feb 3, 2020
Merge #17
17: Queue kinds r=vext01 a=ltratt

This PR adds queue kinds: `queue = <evict|parallel|sequential>`. Previously `parallel` was all we supported, which had some comic outcomes: for example, for yksom, you could get race conditions trying to force push the `gh-pages` branch. `sequential` is now the default. Hopefully the README explains why these exist and why they might be useful.

This is the last major feature I think we need before a 0.1 release (though there are a few minor bits that probably need doing).

Co-authored-by: Laurence Tratt <laurie@tratt.net>
@bors

This comment has been minimized.

Copy link
Contributor

bors bot commented Feb 3, 2020

@bors bors bot merged commit f71b153 into softdevteam:master Feb 3, 2020
1 check passed
1 check passed
bors Build succeeded
Details
@ltratt ltratt deleted the ltratt:queue_types branch Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.