run_scan

Documentation for eth_defi.apex.metrics.run_scan function.

run_scan(session_pool, database, *, vault_ids=None, max_workers=8, history_mode='incremental', history_refresh_interval=datetime.timedelta(days=1), ranking_timeout=300.0, history_timeout=120.0)

Run one complete ApeX ranking observation and due history maintenance.

Ranking is always fetched and validated in full before a target filter is applied. The command scheduler owns ranking cadence; this function records all selected non-terminal vaults whenever called. Historical maintenance is independently gated by persisted success timestamps.

Parameters
Returns

Typed completed-scan summary.

Return type

eth_defi.apex.metrics.ApexScanResult