Skip to content

Commit d27c461

Browse files
committed
ui integration
1 parent f966a18 commit d27c461

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ui/src/server_axum.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,14 @@ async fn evaluate(Json(req): Json<EvaluateRequest>) -> Result<Json<EvaluateRespo
154154

155155
async fn compile(Json(req): Json<CompileRequest>) -> Result<Json<CompileResponse>> {
156156
if cfg!(new) {
157-
let mut coordinator = orchestrator::coordinator::Coordinator::new_docker();
158-
let container = coordinator.allocate().unwrap();
157+
let coordinator = orchestrator::coordinator::Coordinator::new_docker().unwrap();
159158

160159
let req = req.try_into().unwrap();
161-
let resp = container.compile(req).await.unwrap();
160+
let resp = coordinator.compile(req).await.unwrap();
162161
let resp = resp.into();
163162

163+
coordinator.shutdown().await.unwrap();
164+
164165
Ok(Json(resp))
165166
} else {
166167
with_sandbox(

0 commit comments

Comments
 (0)