forked from lix-project/hydra
Disambiguate "marking build as succeeded" message
This commit is contained in:
parent
ad834343b5
commit
00c78440b1
|
@ -225,9 +225,11 @@ State::StepResult State::doBuildStep(nix::ref<Store> destStore, Step::ptr step,
|
|||
finishBuildStep(txn, result.startTime, result.stopTime, result.overhead,
|
||||
build->id, stepNr, machine->sshName, bsSuccess);
|
||||
|
||||
for (auto & b : direct)
|
||||
for (auto & b : direct) {
|
||||
printMsg(lvlInfo, format("marking build %1% as succeeded") % b->id);
|
||||
markSucceededBuild(txn, b, res, build != b || result.isCached,
|
||||
result.startTime, result.stopTime);
|
||||
}
|
||||
|
||||
txn.commit();
|
||||
}
|
||||
|
|
|
@ -353,8 +353,6 @@ void visitDependencies(std::function<void(Step::ptr)> visitor, Step::ptr start)
|
|||
void State::markSucceededBuild(pqxx::work & txn, Build::ptr build,
|
||||
const BuildOutput & res, bool isCachedBuild, time_t startTime, time_t stopTime)
|
||||
{
|
||||
printMsg(lvlInfo, format("marking build %1% as succeeded") % build->id);
|
||||
|
||||
if (build->finishedInDB) return;
|
||||
|
||||
if (txn.parameterized("select 1 from Builds where id = $1 and finished = 0")(build->id).exec().empty()) return;
|
||||
|
|
|
@ -165,6 +165,7 @@ bool State::getQueuedBuilds(Connection & conn, ref<Store> localStore,
|
|||
auto mc = startDbUpdate();
|
||||
pqxx::work txn(conn);
|
||||
time_t now = time(0);
|
||||
printMsg(lvlInfo, format("marking build %1% as succeeded (cached)") % build->id);
|
||||
markSucceededBuild(txn, build, res, true, now, now);
|
||||
txn.commit();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue