diff options
Diffstat (limited to 'lib/Travelynx/Command/work.pm')
-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; } |