diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-06-14 21:49:49 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-06-14 21:49:49 +0200 |
commit | f9664856c7b6e132bae62b35e944d3d95aca7898 (patch) | |
tree | 06725ef86694707908f2e1ff5ff2ddd0dda8324d | |
parent | 2d72ff8fc9dc0980a75cd427ad11a2c1d3ea3c73 (diff) |
work: _really_ do not execute any database actions in maintenance mode
-rw-r--r-- | lib/Travelynx/Command/work.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm index c9ac9b7..b80b0a4 100644 --- a/lib/Travelynx/Command/work.pm +++ b/lib/Travelynx/Command/work.pm @@ -21,6 +21,11 @@ sub run { my $checkin_deadline = $now->clone->subtract( hours => 48 ); my $json = JSON->new; + if ( -e 'maintenance' ) { + $self->app->log->debug('maintenance mode, quitting '); + return; + } + my $num_incomplete = $self->app->in_transit->delete_incomplete_checkins( earlier_than => $checkin_deadline ); @@ -33,6 +38,7 @@ sub run { for my $entry ( $self->app->in_transit->get_all_active ) { if ( -e 'maintenance' ) { + $self->app->log->debug('maintenance mode, quitting '); return; } |