work: _really_ do not execute any database actions in maintenance mode

This commit is contained in:
Birte Kristina Friesel 2024-06-14 21:49:49 +02:00
parent 2d72ff8fc9
commit f9664856c7
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

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