remove live data on error
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 4m14s
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 4m14s
This commit is contained in:
parent
798ae4aa1a
commit
b6085d73fe
1 changed files with 2 additions and 1 deletions
|
|
@ -122,10 +122,11 @@ impl TripTrackingService {
|
||||||
tokio::spawn( async move {
|
tokio::spawn( async move {
|
||||||
loop {
|
loop {
|
||||||
let clonedx_state = Arc::clone(&cloned_state);
|
let clonedx_state = Arc::clone(&cloned_state);
|
||||||
let res = Self::update_live_trips(clonedx_state).await;
|
let res = Self::update_live_trips(clonedx_state.clone()).await;
|
||||||
|
|
||||||
match res {
|
match res {
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
clonedx_state.lock().await.tracking_data = HashMap::new();
|
||||||
error!("{}", err);
|
error!("{}", err);
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue