Skip to content

Commit

Permalink
backend/fix: Add Stop Detection For Bus
Browse files Browse the repository at this point in the history
  • Loading branch information
khuzema786 committed Jan 10, 2025
1 parent 79926da commit 603910d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ async fn process_driver_locations(
&data.stop_detection,
);

let (locations, stop_detected) = match driver_ride_info.as_ref() {
let locations = match driver_ride_info.as_ref() {
Some(RideInfo::Bus {
route_code,
bus_number,
Expand Down Expand Up @@ -324,7 +324,7 @@ async fn process_driver_locations(
&latest_driver_location.pt,
&latest_driver_location_ts,
&None,
None,
stop_detection,
&driver_ride_status,
)
.await?;
Expand All @@ -337,7 +337,7 @@ async fn process_driver_locations(
.into_iter()
.try_for_each(Result::from)?;

(locations, None)
locations
}
None => {
let mut all_tasks: Vec<Pin<Box<dyn Future<Output = Result<(), AppError>>>>> =
Expand Down Expand Up @@ -489,7 +489,7 @@ async fn process_driver_locations(
.into_iter()
.try_for_each(Result::from)?;

(locations, stop_detected)
locations
}
};

Expand Down

0 comments on commit 603910d

Please sign in to comment.