Unverified Commit 3b80a603 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

work: limit dbris journey requests to 0.5 Hz

If $backend is not set, we may have non-dbris checkins in between -- in that
case, we don't need to wait as long
parent f136a53b
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -75,7 +75,9 @@ sub run {

			eval {

				Mojo::Promise->timer( $dbris_rate_limited ? 4.5 : 1.0 )->then(
				Mojo::Promise->timer(
					$dbris_rate_limited ? 4.5 : ( $backend ? 2.0 : 1.0 ) )
				  ->then(
					sub {
						return $self->app->dbris->get_journey_p(
							trip_id => $train_id );