mirror of
https://github.com/derf/travelynx
synced 2024-11-10 06:54:17 +00:00
work: _really_ do not execute any database actions in maintenance mode
This commit is contained in:
parent
2d72ff8fc9
commit
f9664856c7
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue