fix(#2290): drop redundant async blocks around sync_tmpfiles spawn

This commit is contained in:
atlas 2026-07-09 00:02:57 +02:00 committed by mara
commit ae3ecc1de2
3 changed files with 3 additions and 5 deletions

View file

@ -969,7 +969,7 @@ pub async fn destroy(coord: &Arc<Coordinator>, name: &str, purge: bool) -> Resul
coord.emit_schedules_snapshot();
// Update tmpfiles.d to remove the destroyed agent's dirs from the
// boot-time pre-creation list. Best-effort: failure is logged only.
tokio::spawn(async { lifecycle::sync_tmpfiles().await });
tokio::spawn(lifecycle::sync_tmpfiles());
Ok(())
}

View file

@ -286,9 +286,7 @@ async fn cmd_serve(
// Sync /etc/tmpfiles.d/hyperhive-agents.conf so agent runtime dirs are
// pre-declared for the next boot. Best-effort background task — a failure
// here must not block hive-c0re startup. See lifecycle::sync_tmpfiles.
tokio::spawn(async {
hive_c0re::lifecycle::sync_tmpfiles().await;
});
tokio::spawn(hive_c0re::lifecycle::sync_tmpfiles());
// Auto-update in the background — don't block service start.
// Sub-agent rebuilds can take tens of seconds; we want the admin
// socket up immediately.

View file

@ -217,7 +217,7 @@ async fn handle_spawn(coord: &Arc<Coordinator>, name: &str) -> Result<HostRespon
sha: None,
});
// Update tmpfiles.d so the new agent's dirs survive a reboot.
tokio::spawn(async { lifecycle::sync_tmpfiles().await });
tokio::spawn(lifecycle::sync_tmpfiles());
}
Err(e) => {
// Roll back socket registration if container creation failed.