Skip to main content

Module spend_day

Module spend_day 

Source
Expand description

What each agent has used through the model gateway, per route and UTC day (db_agent_spend_day), so an srv restart does not start the day again (docs/specs/SPEC_ROUTE_AGENT_BRAKES_2026_11_10.md section 3.1). backend::model_gateway::spend keeps the live table and writes each changed row here.

The table is created on first use (CREATE TABLE IF NOT EXISTS), as container_limits does: no schema bump, and an older build ignores a table it does not know.

Structs§

SpendDayRow
One agent’s use on one route for one UTC day (day is days since the epoch).

Constants§

KEEP_DAYS
How many days of rows are kept.