* 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.
This commit is contained in:
Eelco Dolstra 2009-03-16 10:57:44 +00:00
parent d2fc382498
commit 54475b9266

View file

@ -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});
});