* Hack around those SQLite timeouts: just retry the transaction.

This commit is contained in:
Eelco Dolstra
2009-04-22 22:43:04 +00:00
parent 80691a39f5
commit 97a6011628
8 changed files with 49 additions and 33 deletions

View File

@ -273,7 +273,7 @@ sub restart : Chained('build') PathPart Args(0) {
requireProjectOwner($c, $build->project);
$c->model('DB')->schema->txn_do(sub {
txn_do($c->model('DB')->schema, sub {
error($c, "This build cannot be restarted.")
unless $build->finished &&
($build->resultInfo->buildstatus == 3 ||
@ -304,7 +304,7 @@ sub cancel : Chained('build') PathPart Args(0) {
requireProjectOwner($c, $build->project);
$c->model('DB')->schema->txn_do(sub {
txn_do($c->model('DB')->schema, sub {
error($c, "This build cannot be cancelled.")
if $build->finished || $build->schedulingInfo->busy;
@ -340,7 +340,7 @@ sub keep : Chained('build') PathPart Args(1) {
registerRoot $build->outpath if $newStatus == 1;
$c->model('DB')->schema->txn_do(sub {
txn_do($c->model('DB')->schema, sub {
$build->resultInfo->update({keep => int $newStatus});
});