Skip to content
Permalink
Browse files

Rollback of transactions (for now)

  • Loading branch information
Eric Chernoff
Eric Chernoff committed Apr 23, 2019
1 parent c4f3459 commit 838607d42dcc7989e63f761e2779ef23514714ed
Showing with 1 addition and 8 deletions.
  1. +0 −1 omnitool/common/login_system.pm
  2. +1 −7 omnitool/dispatcher.pm
@@ -311,7 +311,6 @@ sub test_their_credentials {
# expires => '+24h'
};
# useing the redirect with the cookie is the most reliable way to set it
$self->{luggage}{db}->do_sql('commit'); # must commit since we are terminating early
$self->{luggage}{belt}->{response}->redirect($self->{luggage}{params}{requested_uri});

# tell web_authentication() to not present login form
@@ -32,9 +32,6 @@ sub new {
if (!$args{db} || (not $args{db}->{dbh}->ping)) {
$args{db} = omnitool::common::db->new();
}

# let's use proper ACID transactions
$args{db}->do_sql('begin');

# let's get ready for our trip. Please see notes within omnitool::common::luggage for all that this does
# luggage.pm and sessions.pm conspire to keep this tied to just this instance based on the HTTP_HOST
@@ -55,7 +52,7 @@ sub new {
sub dispatch {
my ($luggage, $ui, $our_output, @uri_parts, $base_path, $blank, $method_name, $uri_path_base, $tool_obj, $run_method, $time_left);
my $self = shift;

# if we are under a maintenance, we will want to report that to the user/browser
# in that case, the OT_MAINTENANCE env var will be set in our startup script
if ($ENV{OT_MAINTENANCE}) {
@@ -108,9 +105,6 @@ sub dispatch {
$our_output = 'ERROR: Do not have a handler set for '.$self->{luggage}{uri}.'.';
}

# let's use proper ACID transactions
$self->{luggage}{db}->do_sql('commit');

# call on our postman object to deliver this
$self->{luggage}{belt}->mr_zebra($our_output);

0 comments on commit 838607d

Please sign in to comment.
You can’t perform that action at this time.