From a6d8566faf5ce905347be84f3d183b108d94c4bb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 9 May 2013 17:46:30 +0200 Subject: [PATCH] If a build aborts, mark any remaining active build steps as aborted See e.g. http://hydra.nixos.org/build/4915744. P.S. existing active build steps of finished builds can be marked as aborted by running: update buildsteps set busy = 0, status = 4 where (build, stepnr) in (select s.build, s.stepnr from buildsteps s join builds b on s.build = b.id where b.finished = 1 and s.busy = 1); --- src/script/hydra-build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/script/hydra-build b/src/script/hydra-build index 941f93c6..f487c9e3 100755 --- a/src/script/hydra-build +++ b/src/script/hydra-build @@ -292,6 +292,9 @@ sub doBuild { addBuildProducts($db, $build); } + # Mark any remaining active build steps as aborted. + $build->buildsteps->search({ busy => 1 })->update({ busy => 0, status => 4, stoptime => time }); + $build->update( { finished => 1 , busy => 0