Communication: hbf-stats
1-hop view of how this service communicates with its siblings. For the full system view, see service-communication.md.
Calls Out To
| Service | Protocol | Purpose | Key calls / queues |
|---|---|---|---|
| hbf-core | HTTP (hbf-core-api) | Tenant polling, stats write-back, org timezone, analytics summary | TenantsClient.list() (statsUpdateLessThan filter), TenantsClient.createOrUpdateStats(), organization timezone fetch, analytics summary fetch |
Called By
Daemon service. Not called by other services.
Daemon Loop
- Polls hbf-core for tenants with stale stats (
EXECUTION_TIME_INTERVAL_MILLISECONDS) - Fetches analytics summary for daily (60 days) and monthly (13 months) periods per tenant
- Writes aggregated stats back via
TenantsClient.createOrUpdateStats() - Processes in configurable batch size with
BATCH_COOLDOWN_SECONDSpause between batches
Contracts
Inbound
None. This is a daemon with no inbound API.
Outbound
| Target | Auth | Env Vars |
|---|---|---|
| hbf-core | Bearer token (CORE_TOKEN) | CORE_URL, CORE_TOKEN |
Additional env vars: EXECUTION_TIME_INTERVAL_MILLISECONDS, BATCH_COOLDOWN_SECONDS