From 1ad8fa3a51b930807d76d92a2d42bdd7f4ef5b80 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 29 May 2024 20:17:01 +0200 Subject: Move wagonorder request to a separate helper This is in preparation for HAFAS wagonorder support --- lib/Travelynx/Command/work.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Travelynx') diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm index 10b1b69..eea6d1b 100644 --- a/lib/Travelynx/Command/work.pm +++ b/lib/Travelynx/Command/work.pm @@ -171,6 +171,8 @@ sub run { } else { $self->app->add_route_timestamps( $uid, $train, 1 ); + $self->app->add_wagonorder( $uid, 1, $train->train_id, + $train->sched_departure, $train->train_no ); } } }; @@ -243,6 +245,8 @@ sub run { and $now->epoch > $entry->{real_arr_ts} ) ? 1 : 0 ); + $self->app->add_wagonorder( $uid, 0, $train->train_id, + $train->sched_departure, $train->train_no ); } } elsif ( $entry->{real_arr_ts} ) { -- cgit v1.2.3