rename worker to actor
This commit is contained in:
10
cmd/main.rs
10
cmd/main.rs
@@ -37,17 +37,17 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Wrap supervisor in Arc for sharing across tasks
|
||||
let supervisor = Arc::new(supervisor);
|
||||
|
||||
// Extract worker configurations from TOML config
|
||||
let worker_configs = supervisor.get_worker_configs()?;
|
||||
info!("Loaded {} worker configurations from TOML", worker_configs.len());
|
||||
// Extract actor configurations from TOML config
|
||||
let actor_configs = supervisor.get_actor_configs()?;
|
||||
info!("Loaded {} actor configurations from TOML", actor_configs.len());
|
||||
|
||||
// Spawn the background lifecycle manager with 5-minute health check interval
|
||||
let health_check_interval = Duration::from_secs(5 * 60); // 5 minutes
|
||||
let mut lifecycle_handle = supervisor.clone().spawn_lifecycle_manager(worker_configs, health_check_interval);
|
||||
let mut lifecycle_handle = supervisor.clone().spawn_lifecycle_manager(actor_configs, health_check_interval);
|
||||
|
||||
info!("Hero Supervisor started successfully!");
|
||||
info!("Background lifecycle manager is running with 5-minute health checks.");
|
||||
info!("Workers are being monitored and will be automatically restarted if they fail.");
|
||||
info!("Actors are being monitored and will be automatically restarted if they fail.");
|
||||
|
||||
// Start WebSocket server for job dispatching
|
||||
info!("Starting WebSocket server for job dispatching...");
|
||||
|
Reference in New Issue
Block a user