Poke server tasks in coordinator

This commit is contained in:
Joscha 2023-08-11 01:11:53 +02:00
parent 7911a67906
commit 33607779b0
3 changed files with 82 additions and 41 deletions

View file

@ -25,16 +25,15 @@ impl Runner {
return;
}
let names = self.config.runner_servers.keys().cloned().collect();
let coordinator = Arc::new(Mutex::new(Coordinator::new(names)));
let coordinator = Arc::new(Mutex::new(Coordinator::new()));
let mut tasks = JoinSet::new();
for (name, config) in self.config.runner_servers.iter() {
for (name, server_config) in self.config.runner_servers.iter() {
debug!("Launching task for server {name}");
let mut server = Server::new(
name.clone(),
config,
self.config.runner_ping_delay,
self.config,
server_config,
coordinator.clone(),
);
tasks.spawn(async move { server.run().await });