Skip to content

Commit

Permalink
fix initRedis after upload
Browse files Browse the repository at this point in the history
  • Loading branch information
tom1484 committed Feb 4, 2024
1 parent 4385632 commit 16f47c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions editor-server/src/routes/api/upload_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct ControlData {
#[derive(Debug, Deserialize, Serialize)]
struct PositionData {
start: i32,
pos: Vec<[i32; 3]>,
pos: Vec<[f32; 3]>,
}

#[derive(Debug, Deserialize, Serialize)]
Expand Down Expand Up @@ -410,15 +410,16 @@ pub async fn upload_data(
}
control_progress.finish();

tx.commit().await.into_result()?;
println!("Upload Finish!");

init_redis_control(clients.mysql_pool(), clients.redis_client())
.await
.expect("Error initializing redis control.");
init_redis_position(clients.mysql_pool(), clients.redis_client())
.await
.expect("Error initializing redis position.");

tx.commit().await.into_result()?;
println!("Upload Finish!");
Ok((
StatusCode::OK,
Json(UploadDataResponse(
Expand Down

0 comments on commit 16f47c1

Please sign in to comment.