Skip to content

Commit

Permalink
Merge pull request #259 from jglick/stopping
Browse files Browse the repository at this point in the history
Try to remove items from completed builds even if supposedly already cancelled
  • Loading branch information
jglick authored Nov 16, 2022
2 parents 8628f21 + 16915df commit 38306d8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,12 @@ public String getCookie() {
if (FlowExecutionList.get().isResumptionComplete()) {
// We only do this if resumption is complete so that we do not load the run and resume its execution in this context in normal scenarios.
Run<?, ?> run = runForDisplay();
if (!stopping && run != null && !run.isLogUpdated()) {
stopping = true;
if (run != null && !run.isLogUpdated()) {
if (stopping) {
LOGGER.warning(() -> "Refusing to build " + PlaceholderTask.this + " and going to cancel it, even though it was supposedly stopped already, because associated build is complete");
} else {
stopping = true;
}
Timer.get().execute(() -> {
if (Queue.getInstance().cancel(this)) {
LOGGER.warning(() -> "Refusing to build " + PlaceholderTask.this + " and cancelling it because associated build is complete");
Expand Down

0 comments on commit 38306d8

Please sign in to comment.