knowledge: ping every agent when internal/knowledge changes
This commit is contained in:
parent
94fb42f2b6
commit
78b90604a1
3 changed files with 77 additions and 10 deletions
|
|
@ -376,11 +376,12 @@ async fn cmd_serve(
|
|||
// missed (e.g. hive-c0re was down during a push). First fires at
|
||||
// startup (immediate pull after the clone is already present).
|
||||
let mut knowledge_shutdown = coord.shutdown_rx();
|
||||
let knowledge_coord = coord.clone();
|
||||
tokio::spawn(async move {
|
||||
// Initial pull — reconcile any commits that landed while c0re
|
||||
// was offline. Not fed to the health tracker: a startup miss is
|
||||
// expected (the clone may not exist yet) and is logged at debug.
|
||||
if let Err(e) = knowledge::pull().await {
|
||||
if let Err(e) = knowledge::pull(&knowledge_coord).await {
|
||||
tracing::debug!(error = ?e, "knowledge: startup pull skipped (no clone yet?)");
|
||||
}
|
||||
// Persistent-failure → banner. An hourly sweep that keeps failing for
|
||||
|
|
@ -393,7 +394,7 @@ async fn cmd_serve(
|
|||
loop {
|
||||
tokio::select! {
|
||||
() = tokio::time::sleep(interval) => {
|
||||
match knowledge::pull().await {
|
||||
match knowledge::pull(&knowledge_coord).await {
|
||||
Ok(()) => health.record_ok(),
|
||||
Err(e) => {
|
||||
tracing::warn!(error = ?e, "knowledge: periodic pull failed");
|
||||
|
|
|
|||
Loading…
Reference in a new issue