[router] Health check on worker before adding to the router (#2392)

This commit is contained in:
Byron Hsu
2024-12-07 15:39:54 -08:00
committed by GitHub
parent 75ae968959
commit ef995dae1e
5 changed files with 79 additions and 31 deletions

View File

@@ -141,8 +141,7 @@ async fn add_worker(
.body("Worker URL required. Provide 'url' query parameter")
}
};
data.router.add_worker(worker_url);
HttpResponse::Ok().finish()
data.router.add_worker(worker_url).await
}
#[post("/remove_worker")]