fix: update deployment image to new riotpiao-poimen org path #45
@@ -374,8 +374,10 @@ pub async fn start_server(port: u16, api_key: String, database_url: &str) -> Res
|
||||
});
|
||||
|
||||
tracing::info!("Starting HTTP server on port {}", port);
|
||||
tracing::info!("Creating HttpServer instance...");
|
||||
|
||||
HttpServer::new(move || {
|
||||
let server = HttpServer::new(move || {
|
||||
tracing::debug!("HttpServer::new() closure executing");
|
||||
App::new()
|
||||
.app_data(state.clone())
|
||||
.wrap(Logger::default())
|
||||
@@ -413,10 +415,13 @@ pub async fn start_server(port: u16, api_key: String, database_url: &str) -> Res
|
||||
.route("/agents/{id}", web::put().to(crate::handlers::agent_handler::update_agent_handler))
|
||||
.route("/agents/{id}", web::delete().to(crate::handlers::agent_handler::delete_agent_handler))
|
||||
.route("/agents/{id}/metrics", web::get().to(crate::handlers::agent_handler::get_agent_metrics_handler))
|
||||
})
|
||||
.bind(("0.0.0.0", port))?
|
||||
.run()
|
||||
.await?;
|
||||
});
|
||||
|
||||
tracing::info!("HttpServer instance created, binding to 0.0.0.0:{}", port);
|
||||
let server = server.bind(("0.0.0.0", port))?;
|
||||
tracing::info!("Successfully bound to port {}, about to run", port);
|
||||
|
||||
server.run().await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user