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 $checkin_deadline = $now->clone->subtract( hours => 48 );
|
||||||
my $json = JSON->new;
|
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(
|
my $num_incomplete = $self->app->in_transit->delete_incomplete_checkins(
|
||||||
earlier_than => $checkin_deadline );
|
earlier_than => $checkin_deadline );
|
||||||
|
|
||||||
|
@ -33,6 +38,7 @@ sub run {
|
||||||
for my $entry ( $self->app->in_transit->get_all_active ) {
|
for my $entry ( $self->app->in_transit->get_all_active ) {
|
||||||
|
|
||||||
if ( -e 'maintenance' ) {
|
if ( -e 'maintenance' ) {
|
||||||
|
$self->app->log->debug('maintenance mode, quitting ');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue