Unverified Commit 1c05afba authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

EFA: handle arrival being cancelled after checkin

parent 786a4d6a
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -229,7 +229,12 @@ sub run {
							);
						}

						if ( $found_arr and $found_arr->rt_arr ) {
						if (
							$found_arr
							and
							( $found_arr->rt_arr or $found_arr->is_cancelled )
						  )
						{
							$self->app->in_transit->update_arrival_efa(
								uid     => $uid,
								journey => $journey,
@@ -239,6 +244,18 @@ sub run {
								trip_id => $train_id,
							);
						}
						if ( $found_arr and $found_arr->is_cancelled ) {

							# check out (adds a cancelled journey and resets journey state
							# to destination selection)
							$self->app->checkout_p(
								station => $arr,
								force   => 0,
								dep_eva => $dep,
								arr_eva => $arr,
								uid     => $uid
							)->wait;
						}
					}
				)->catch(
					sub {
+10 −9
Original line number Diff line number Diff line
@@ -1262,6 +1262,7 @@ sub update_arrival_efa {
					sched_dep   => _epoch( $j_stop->sched_dep ),
					rt_arr      => _epoch( $j_stop->rt_arr ),
					rt_dep      => _epoch( $j_stop->rt_dep ),
					isCancelled => $j_stop->is_cancelled,
					arr_delay   => $j_stop->arr_delay,
					dep_delay   => $j_stop->dep_delay,
					efa_load    => $j_stop->occupancy,