datarobot_genai.dragent.registry_refresh
registry_refresh
Background refresh loop for the central agent card registry cache.
background_refresh_interval
Return the background refresh poll interval for soft_cache_ttl.
Polls at half the soft TTL (minimum 60s) so expired entries are picked up soon after they go stale rather than waiting up to another full soft TTL.
Source code in datarobot_genai/dragent/registry_refresh.py
refresh_sleep_seconds
refresh_sleep_seconds(base_interval: int, soft_cache_ttl: int, failures: int, *, rng: _SupportsUniform | None = None) -> float
Return the next background-refresh sleep duration.
Healthy polls (failures == 0) sleep base_interval with ±50% jitter.
After consecutive failures the delay grows as base * 2**failures,
capped at min(15m, max(base, soft_ttl)), then jittered the same way.
Source code in datarobot_genai/dragent/registry_refresh.py
registry_refresh_loop
async
Periodically refresh soft-expired registered agent cards.
Sleeps a jittered interval before each attempt. Consecutive failures exponentially increase the next delay (still jittered) so many agents do not keep hammering Control Hub in lockstep during an outage.
Source code in datarobot_genai/dragent/registry_refresh.py
registry_refresh_lifespan
async
Start the background refresh task for the registry singleton.
No-op when no registry-backed remote A2A clients are configured.