user_status: Improve TS lookup performance

This commit is contained in:
Daniel Friesel 2020-02-20 20:58:58 +01:00
parent 57f686b688
commit 0011e4a18d

View file

@ -62,13 +62,16 @@ sub user_status {
$self->get_user_travels(
uid => $user->{id},
limit => 10,
verbose => 1,
with_datetime => 1
)
)
{
if ( $candidate->{sched_departure}->epoch eq $ts ) {
$journey = $candidate;
if ( $candidate->{sched_dep_ts} eq $ts ) {
$journey = $self->get_journey(
uid => $user->{id},
journey_id => $candidate->{id},
verbose => 1,
with_datetime => 1,
);
}
}
}