make_empty_metrics_state

Documentation for eth_defi.research.metrics_freshness.make_empty_metrics_state function.

make_empty_metrics_state(now)

Create an empty freshness state document.

Used on first deploy, after state loss, and when quarantining a corrupt state file; all three cases intentionally degrade to one full recomputation run.

Parameters

now (datetime.datetime) – Current naive UTC datetime.

Returns

Empty state mapping.

Return type

dict