From f1da50f9f18f0a2a5fd202daff4b6f0b517f35e0 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 9 Jun 2025 16:57:36 +0200 Subject: Fix worker for MOTIS checkins Apparently, even after a check-in has been performed, subsequent worker runs may encounter stop IDs that were not added to stations_external_ids by the check-in process. So we need to add_or_update all stops we ecounter. --- lib/Travelynx/Model/Stations.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/Travelynx/Model') diff --git a/lib/Travelynx/Model/Stations.pm b/lib/Travelynx/Model/Stations.pm index 6758b93..174b3b4 100644 --- a/lib/Travelynx/Model/Stations.pm +++ b/lib/Travelynx/Model/Stations.pm @@ -120,6 +120,7 @@ sub get_backends { return @ret; } +# Slow for MOTIS backends sub add_or_update { my ( $self, %opt ) = @_; my $stop = $opt{stop}; @@ -188,8 +189,8 @@ sub add_or_update { } ); + # MOTIS backends do not provide a numeric ID, so we set our ID here. $stop->{eva} = $s->{eva}; - return; } @@ -211,8 +212,8 @@ sub add_or_update { ) ); + # MOTIS backends do not provide a numeric ID, so we set our ID here. $stop->{eva} = $s->hash->{eva}; - return; } -- cgit v1.2.3