* 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

@ -146,14 +146,14 @@ sub releases :Local {
}
elsif ($subcommand eq "submit") {
$c->model('DB')->schema->txn_do(sub {
txn_do($c->model('DB')->schema, sub {
updateReleaseSet($c, $releaseSet);
});
return $c->res->redirect($c->uri_for("/releases", $projectName, $releaseSet->name));
}
elsif ($subcommand eq "delete") {
$c->model('DB')->schema->txn_do(sub {
txn_do($c->model('DB')->schema, sub {
$releaseSet->delete;
});
return $c->res->redirect($c->uri_for($c->controller('Project')->action_for('view'), [$project->name]));
@ -181,7 +181,7 @@ sub create_releaseset :Local {
if (defined $subcommand && $subcommand eq "submit") {
my $releaseSetName = $c->request->params->{name};
$c->model('DB')->schema->txn_do(sub {
txn_do($c->model('DB')->schema, sub {
# Note: $releaseSetName is validated in updateProject,
# which will abort the transaction if the name isn't
# valid.