Skip to content

Commit

Permalink
IRIS checkout: do not overwrite HAFAS route with IRIS route
Browse files Browse the repository at this point in the history
The IRIS route may differ from the HAFAS route in case of diversions,
causing travelynx to lose real-time data, coordinates, and polyline when
the follow-up add_route_timestamps call is not made.
  • Loading branch information
derf committed Aug 14, 2024
1 parent 772b4e3 commit 119f2ea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion lib/Travelynx.pm
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,6 @@ sub startup {
uid => $uid,
db => $db,
train => $train,
route => [ $self->iris->route_diff($train) ]
);

$has_arrived
Expand Down
8 changes: 0 additions & 8 deletions lib/Travelynx/Model/InTransit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,6 @@ sub set_arrival {
my $uid = $opt{uid};
my $db = $opt{db} // $self->{pg}->db;
my $train = $opt{train};
my $route = $opt{route};

$route = $self->_merge_old_route(
db => $db,
uid => $uid,
route => $route
);

my $json = JSON->new;

Expand All @@ -500,7 +493,6 @@ sub set_arrival {
arr_platform => $train->platform,
sched_arrival => $train->sched_arrival,
real_arrival => $train->arrival,
route => $json->encode($route),
messages => $json->encode(
[ map { [ $_->[0]->epoch, $_->[1] ] } $train->messages ]
)
Expand Down

0 comments on commit 119f2ea

Please sign in to comment.