summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Command/work.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-05-29 20:17:01 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-05-29 20:17:01 +0200
commit1ad8fa3a51b930807d76d92a2d42bdd7f4ef5b80 (patch)
tree23dfbf97aca0d055cf783be85e10aab9e9b035b6 /lib/Travelynx/Command/work.pm
parenteef53c6940a61bb72ffefdca825913e169a0a05e (diff)
Move wagonorder request to a separate helper
This is in preparation for HAFAS wagonorder support
Diffstat (limited to 'lib/Travelynx/Command/work.pm')
-rw-r--r--lib/Travelynx/Command/work.pm4
1 files changed, 4 insertions, 0 deletions
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} ) {