diff --git a/zeusd/src/main.rs b/zeusd/src/main.rs index 3b0a9341..28cca7ae 100644 --- a/zeusd/src/main.rs +++ b/zeusd/src/main.rs @@ -50,7 +50,7 @@ async fn main() -> anyhow::Result<()> { let listener = TcpListener::bind(&config.tcp_bind_address)?; tracing::info!("Listening on {}", &listener.local_addr()?); - start_server_tcp(listener, device_tasks, num_workers)?.await?; + start_server_tcp(listener, device_tasks, cpu_device_tasks.clone(), num_workers)?.await?; } } diff --git a/zeusd/src/startup.rs b/zeusd/src/startup.rs index bed76056..161f54f9 100644 --- a/zeusd/src/startup.rs +++ b/zeusd/src/startup.rs @@ -116,6 +116,7 @@ pub fn start_server_uds( pub fn start_server_tcp( listener: TcpListener, device_tasks: GpuManagementTasks, + cpu_device_tasks: CpuManagementTasks, num_workers: usize, ) -> std::io::Result { let server = HttpServer::new(move || { @@ -124,6 +125,7 @@ pub fn start_server_tcp( .service(web::scope("/gpu").configure(gpu_routes)) .service(web::scope("/cpu").configure(cpu_routes)) .app_data(web::Data::new(device_tasks.clone())) + .app_data(web::Data::new(cpu_device_tasks.clone())) }) .workers(num_workers) .listen(listener)?