diff options
Diffstat (limited to 'lib/Travelynx/Command')
-rw-r--r-- | lib/Travelynx/Command/database.pm | 3 | ||||
-rw-r--r-- | lib/Travelynx/Command/traewelling.pm | 4 | ||||
-rw-r--r-- | lib/Travelynx/Command/work.pm | 12 |
3 files changed, 12 insertions, 7 deletions
diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm index 0e87b2a..e264c89 100644 --- a/lib/Travelynx/Command/database.pm +++ b/lib/Travelynx/Command/database.pm @@ -3270,7 +3270,8 @@ sub sync_backends_motis { } } - $db->update( 'schema_version', { motis => $Travel::Status::MOTIS::VERSION } ); + $db->update( 'schema_version', + { motis => $Travel::Status::MOTIS::VERSION } ); } sub setup_db { diff --git a/lib/Travelynx/Command/traewelling.pm b/lib/Travelynx/Command/traewelling.pm index ed40371..e4e0134 100644 --- a/lib/Travelynx/Command/traewelling.pm +++ b/lib/Travelynx/Command/traewelling.pm @@ -122,12 +122,12 @@ sub push_sync { my ($status) = @_; $push_result{ $status->{http} } += 1; } - )->catch( + )->catch( sub { my ($status) = @_; $push_result{ $status->{http} // 0 } += 1; } - )->wait; + )->wait; } return \%push_result; diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm index 4ff5c9e..9cc0ca1 100644 --- a/lib/Travelynx/Command/work.pm +++ b/lib/Travelynx/Command/work.pm @@ -197,10 +197,11 @@ sub run { for my $stopover ( $journey->stopovers ) { if ( not defined $stopover->stop->{eva} ) { - my $stop = $self->app->stations->get_by_external_id( + my $stop + = $self->app->stations->get_by_external_id( external_id => $stopover->stop->id, motis => $entry->{backend_name}, - ); + ); $stopover->stop->{eva} = $stop->{eva}; } @@ -220,7 +221,8 @@ sub run { } if ( not $found_departure ) { - $self->app->log->debug("Did not find $dep within trip $train_id"); + $self->app->log->debug( + "Did not find $dep within trip $train_id"); return; } @@ -235,7 +237,9 @@ sub run { ); } - if ( $found_arrival and $found_arrival->realtime_arrival ) { + if ( $found_arrival + and $found_arrival->realtime_arrival ) + { $self->app->in_transit->update_arrival_motis( uid => $uid, journey => $journey, |