summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Command
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-12-27 20:11:26 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-12-27 20:11:26 +0100
commiteade158164e93484c1ca00e5005ce66bef58c704 (patch)
treec692a1ada4e5c666a6f16f83121036e1f3607d1d /lib/Travelynx/Command
parent364137b9b6339b724b109160e6e0d3904b022037 (diff)
IRIS: show connections at destination while checked in
Diffstat (limited to 'lib/Travelynx/Command')
-rw-r--r--lib/Travelynx/Command/work.pm35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm
index d6e70ed..41325d2 100644
--- a/lib/Travelynx/Command/work.pm
+++ b/lib/Travelynx/Command/work.pm
@@ -782,6 +782,41 @@ sub run {
$self->app->add_stationinfo( $uid, 0, $train->train_id,
$dep, $arr );
}
+ if ( $now->epoch - $entry->{real_arr_ts} < 900 ) {
+ my @destinations
+ = $self->app->journeys->get_connection_targets(
+ uid => $uid,
+ backend_id => $entry->{backend_id},
+ eva => $arr,
+ exclude => $dep,
+ );
+ $self->app->iris->get_connections_p(
+ station => $arr,
+ timestamp => $entry->{real_arr},
+ destinations => \@destinations
+ )->then(
+ sub {
+ my ($suggestions) = @_;
+ $self->app->in_transit->update_data(
+ uid => $uid,
+ train_id => $train_id,
+ data => {
+ connection_suggestions_iris =>
+ $suggestions
+ },
+ );
+ return;
+ }
+ )->catch(
+ sub {
+ my ($err) = @_;
+ $self->app->log->debug(
+"work($uid) @ DBRIS $entry->{backend_name}: get_departures_p($arr): $err"
+ );
+ return;
+ }
+ )->wait;
+ }
}
elsif ( $entry->{real_arr_ts} ) {
my ( undef, $error ) = $self->app->checkout_p(