hydra-queue-runner: --build-one: correctly handle a cached build
Previously, the build ID would never flow through channels which exited. This patch tracks the buildOne state as part of State and exits avoids waiting forever for new work. The code around buildOnly is a bit rough, making this a bit weird to implement but since it is only used for testing the value of improving it on its own is a bit questionable.
This commit is contained in:
@ -374,7 +374,6 @@ void State::abortUnsupported()
|
||||
if (!build) build = *dependents.begin();
|
||||
|
||||
bool stepFinished = false;
|
||||
bool quit = false;
|
||||
|
||||
failStep(
|
||||
*conn, step, build->id,
|
||||
@ -385,9 +384,9 @@ void State::abortUnsupported()
|
||||
.startTime = now2,
|
||||
.stopTime = now2,
|
||||
},
|
||||
nullptr, stepFinished, quit);
|
||||
nullptr, stepFinished);
|
||||
|
||||
if (quit) exit(1);
|
||||
if (buildOneDone) exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user