added container broadcasting
All checks were successful
Rust Cross-Platform Build / Detect Rust Project (push) Successful in 5s
Rust Cross-Platform Build / Run Tests (push) Successful in 1m14s
Rust Cross-Platform Build / Build (x86_64-unknown-linux-gnu) (push) Successful in 3m18s
Rust Cross-Platform Build / Build (x86_64-pc-windows-gnu) (push) Successful in 4m4s
Rust Cross-Platform Build / Set Tag Name (push) Successful in 5s
Rust Cross-Platform Build / Build and Push Docker Image (push) Successful in 2m19s
Rust Cross-Platform Build / Workflow Summary (push) Successful in 2s
Rust Cross-Platform Build / Create Tag (push) Successful in 5s
All checks were successful
Rust Cross-Platform Build / Detect Rust Project (push) Successful in 5s
Rust Cross-Platform Build / Run Tests (push) Successful in 1m14s
Rust Cross-Platform Build / Build (x86_64-unknown-linux-gnu) (push) Successful in 3m18s
Rust Cross-Platform Build / Build (x86_64-pc-windows-gnu) (push) Successful in 4m4s
Rust Cross-Platform Build / Set Tag Name (push) Successful in 5s
Rust Cross-Platform Build / Build and Push Docker Image (push) Successful in 2m19s
Rust Cross-Platform Build / Workflow Summary (push) Successful in 2s
Rust Cross-Platform Build / Create Tag (push) Successful in 5s
This commit is contained in:
@@ -94,7 +94,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
|
||||
Ok((id, ip)) => {
|
||||
println!("Registered with server. ID: {}, IP: {}", id, ip);
|
||||
(id, ip)
|
||||
},
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("Fehler bei der Registrierung am Server: {e}");
|
||||
return Err(e);
|
||||
@@ -112,6 +112,19 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
|
||||
};
|
||||
println!("Client Version: {}", client_version);
|
||||
|
||||
// Prepare Docker registration DTO
|
||||
let container_dto = if let Some(ref docker_manager) = docker_manager {
|
||||
docker_manager.create_registration_dto().await?
|
||||
} else {
|
||||
models::DockerRegistrationDto {
|
||||
server_id: 0,
|
||||
//container_count: 0, --- IGNORE ---
|
||||
containers: "[]".to_string(),
|
||||
}
|
||||
};
|
||||
let _ =
|
||||
api::broadcast_docker_containers(server_url, server_id, &mut container_dto.clone()).await?;
|
||||
|
||||
// Start background tasks
|
||||
// Start server listening for commands (only if Docker is available)
|
||||
let listening_handle = if let Some(ref docker_manager) = docker_manager {
|
||||
|
Reference in New Issue
Block a user