summaryrefslogtreecommitdiff
path: root/makima/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/server')
-rw-r--r--makima/src/server/mod.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/makima/src/server/mod.rs b/makima/src/server/mod.rs
index 7a1391b..4cb4296 100644
--- a/makima/src/server/mod.rs
+++ b/makima/src/server/mod.rs
@@ -481,6 +481,25 @@ pub async fn run_server(state: SharedState, addr: &str) -> anyhow::Result<()> {
"Retry orchestrator started (interval: {}s)",
RETRY_ORCHESTRATOR_INTERVAL_SECS
);
+
+ // Spawn directive orchestrator - automates directive lifecycle
+ let directive_pool = pool.clone();
+ let directive_state = state.clone();
+ tokio::spawn(async move {
+ let mut orch = crate::orchestration::directive::DirectiveOrchestrator::new(
+ directive_pool,
+ directive_state,
+ );
+ let mut interval = tokio::time::interval(std::time::Duration::from_secs(15));
+ loop {
+ interval.tick().await;
+ if let Err(e) = orch.tick().await {
+ tracing::warn!(error = %e, "Directive orchestrator tick failed");
+ }
+ }
+ });
+
+ tracing::info!("Directive orchestrator started (interval: 15s)");
}
let app = make_router(state);