add_route_timestamps: use $train->id rather than in_transit id

this avoids a race condition when the worker requests all current checkins and
takes a while before getting to update the data
This commit is contained in:
Birte Kristina Friesel 2024-06-21 18:27:37 +02:00
parent 7e4944614c
commit cb8964fb3c
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -1358,7 +1358,7 @@ sub startup {
} }
my $route = $in_transit->{route}; my $route = $in_transit->{route};
my $train_id = $in_transit->{train_id}; my $train_id = $train->id;
# TODO get_tripid_p is only needed on the first call, afterwards the tripid is known. # TODO get_tripid_p is only needed on the first call, afterwards the tripid is known.
$self->hafas->get_tripid_p( train => $train )->then( $self->hafas->get_tripid_p( train => $train )->then(