Handle active build steps of aborted builds properly

This commit is contained in:
Eelco Dolstra
2013-01-22 23:01:29 +01:00
parent 30e5185acf
commit ecdbce1a61
3 changed files with 6 additions and 10 deletions

View File

@ -286,10 +286,7 @@ sub doBuild {
my $drvPathStep = $1;
txn_do($db, sub {
my $step = $build->buildsteps->find({stepnr => $buildSteps{$drvPathStep}}) or die;
my $stepOutpath = $step->outpath;
my $stepStatus = 0;
$step->update({busy => 0, status => $stepStatus, stoptime => time});
$step->update({busy => 0, status => 0, stoptime => time});
});
}

View File

@ -41,6 +41,7 @@ sub unlockDeadBuilds {
if ($unlock) {
print "build ", $build->id, " pid $pid died, unlocking\n";
$build->update({ busy => 0, locker => ""});
$build->buildsteps->search({ busy => 1 })->update({ busy => 0, status => 4, stoptime => time });
}
}
});