From 54475b92665e973de2d0b15da3ed014c6d88651b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 16 Mar 2009 10:57:44 +0000 Subject: [PATCH] * When marking a build as "keep", register it as a root right away (don't wait for someone to run hydra_update_gcroots), otherwise it may still be GC'ed. --- src/lib/Hydra/Controller/Build.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index c40e2fa0..e21128f5 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -240,6 +240,8 @@ sub keep : Chained('build') PathPart Args(1) { die unless $newStatus == 0 || $newStatus == 1; + registerRoot $build->outpath if $newStatus == 1; + $c->model('DB')->schema->txn_do(sub { $build->resultInfo->update({keep => int $newStatus}); });