Loading lib/Travelynx/Command/work.pm +101 −91 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ sub run { if ( $entry->{is_hafas} ) { eval { $self->app->hafas->get_journey_p( trip_id => $train_id, service => $entry->{backend_name} Loading Loading @@ -94,8 +96,8 @@ sub run { train_type => $journey->type, train_no => $journey->number, ); $self->app->add_stationinfo( $uid, 1, $journey->id, $found_dep->loc->eva ); $self->app->add_stationinfo( $uid, 1, $journey->id, $found_dep->loc->eva ); } } Loading @@ -109,7 +111,8 @@ sub run { ); if ( $entry->{backend_id} <= 1 and $journey->class <= 16 and $found_arr->rt_arr->epoch - $now->epoch < 600 ) and $found_arr->rt_arr->epoch - $now->epoch < 600 ) { $self->app->add_wagonorder( uid => $uid, Loading @@ -120,15 +123,17 @@ sub run { train_type => $journey->type, train_no => $journey->number, ); $self->app->add_stationinfo( $uid, 0, $journey->id, $found_dep->loc->eva, $found_arr->loc->eva ); $self->app->add_stationinfo( $uid, 0, $journey->id, $found_dep->loc->eva, $found_arr->loc->eva ); } } } )->catch( sub { my ($err) = @_; if ( $err =~ m{svcResL\[0\][.]err is (?:FAIL|PARAMETER)$} ) if ( $err =~ m{svcResL\[0\][.]err is (?:FAIL|PARAMETER)$} ) { # HAFAS do be weird. These are not actionable. $self->app->log->debug("work($uid)/journey: $err"); Loading @@ -152,6 +157,11 @@ sub run { )->wait; } next; }; if ($@) { $errors += 1; $self->app->log->error("work($uid)/hafas: $@"); } } # TODO irgendwo ist hier ne race condition wo ein neuer checkin (in HAFAS) mit IRIS-Daten überschrieben wird. Loading Loading
lib/Travelynx/Command/work.pm +101 −91 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ sub run { if ( $entry->{is_hafas} ) { eval { $self->app->hafas->get_journey_p( trip_id => $train_id, service => $entry->{backend_name} Loading Loading @@ -94,8 +96,8 @@ sub run { train_type => $journey->type, train_no => $journey->number, ); $self->app->add_stationinfo( $uid, 1, $journey->id, $found_dep->loc->eva ); $self->app->add_stationinfo( $uid, 1, $journey->id, $found_dep->loc->eva ); } } Loading @@ -109,7 +111,8 @@ sub run { ); if ( $entry->{backend_id} <= 1 and $journey->class <= 16 and $found_arr->rt_arr->epoch - $now->epoch < 600 ) and $found_arr->rt_arr->epoch - $now->epoch < 600 ) { $self->app->add_wagonorder( uid => $uid, Loading @@ -120,15 +123,17 @@ sub run { train_type => $journey->type, train_no => $journey->number, ); $self->app->add_stationinfo( $uid, 0, $journey->id, $found_dep->loc->eva, $found_arr->loc->eva ); $self->app->add_stationinfo( $uid, 0, $journey->id, $found_dep->loc->eva, $found_arr->loc->eva ); } } } )->catch( sub { my ($err) = @_; if ( $err =~ m{svcResL\[0\][.]err is (?:FAIL|PARAMETER)$} ) if ( $err =~ m{svcResL\[0\][.]err is (?:FAIL|PARAMETER)$} ) { # HAFAS do be weird. These are not actionable. $self->app->log->debug("work($uid)/journey: $err"); Loading @@ -152,6 +157,11 @@ sub run { )->wait; } next; }; if ($@) { $errors += 1; $self->app->log->error("work($uid)/hafas: $@"); } } # TODO irgendwo ist hier ne race condition wo ein neuer checkin (in HAFAS) mit IRIS-Daten überschrieben wird. Loading