Fix asset inventory update
This commit is contained in:
+6
-2
@@ -12,8 +12,12 @@
|
||||
//! Get-CimInstance and emits compact JSON. One subprocess for the whole
|
||||
//! inventory is cheaper than per-field WMI queries and avoids pulling a
|
||||
//! `wmi`/COM crate into the dep tree. Inventory is collected once at
|
||||
//! startup; the sysinfo loop's hash-compare suppresses re-uploads of
|
||||
//! unchanged data, so this isn't repeated on every 120 s tick.
|
||||
//! startup. Collection routinely outruns the first sysinfo tick (TIME_CONN
|
||||
//! = 3 s) — `Invoke-RestMethod 'api.ipify.org' -TimeoutSec 5` alone can
|
||||
//! burn that budget on hosts with blocked egress — so the sysinfo loop in
|
||||
//! `hbbs_http::sync` watches for INVENTORY transitioning empty → populated
|
||||
//! and forces a re-upload at that point. Subsequent ticks are suppressed
|
||||
//! by the loop's `had_inventory` / `uploaded` bookkeeping.
|
||||
//!
|
||||
//! Non-Windows builds return an empty JSON object — hello-agent v0 only
|
||||
//! ships on Windows, but keeping the cross-platform surface compiling
|
||||
|
||||
Reference in New Issue
Block a user