fix batch_id uuids
This commit is contained in:
@ -272,6 +272,13 @@ impl EngineManager for EngineConnection {
|
|||||||
|
|
||||||
println!("final req {:?}", final_req);
|
println!("final req {:?}", final_req);
|
||||||
|
|
||||||
|
// We pop off the responses to cleanup our mappings.
|
||||||
|
let id_final = match final_req {
|
||||||
|
WebSocketRequest::ModelingCmdBatchReq { requests: _, batch_id } => batch_id,
|
||||||
|
WebSocketRequest::ModelingCmdReq { cmd: _, cmd_id } => cmd_id,
|
||||||
|
_ => panic!("should not be possible"),
|
||||||
|
};
|
||||||
|
|
||||||
let (tx, rx) = oneshot::channel();
|
let (tx, rx) = oneshot::channel();
|
||||||
|
|
||||||
// Send the request to the engine, via the actor.
|
// Send the request to the engine, via the actor.
|
||||||
@ -315,9 +322,9 @@ impl EngineManager for EngineConnection {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// We pop off the responses to cleanup our mappings.
|
|
||||||
if let Some((_, resp)) = self.responses.remove(&id) {
|
if let Some((_, resp)) = self.responses.remove(&id_final) {
|
||||||
println!("{:?}", resp);
|
println!("RESP {:?}", resp);
|
||||||
return if let Some(data) = &resp.resp {
|
return if let Some(data) = &resp.resp {
|
||||||
Ok(data.clone())
|
Ok(data.clone())
|
||||||
} else {
|
} else {
|
||||||
@ -330,7 +337,7 @@ impl EngineManager for EngineConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Err(KclError::Engine(KclErrorDetails {
|
Err(KclError::Engine(KclErrorDetails {
|
||||||
message: format!("Modeling command timed out `{}`", id),
|
message: format!("Modeling command timed out `{}`", id_final),
|
||||||
source_ranges: vec![source_range],
|
source_ranges: vec![source_range],
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user