The admin range control moved almost nothing: the four tiles at the top were
fixed at thirty days, seven days and all time - the field names said so,
`cost_30d_usd` and `runs_failed_7d` - and the runs tab took the range and
dropped it. Everything on the page answers it now, and each tile says which
window it is showing.
The usage page mixed two windows: the tiles and the donut counted from the
first of the calendar month, the chart and the history counted back thirty
days. It is one window now, chosen by the person, «الكل» included - the
endpoint already took `days` and the client had never sent it.
And a run that was over kept getting longer. Three paths left `finished_at`
NULL on a terminal run - the worker's startup sweep, the crash handler outside
the engine, and the step rows under both - and a missing end time reads as
«still going». Those paths write the ending now, and a migration closes the
rows already in the table.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The million Redis commands were a lock over a local file
The meter read 1.1M commands and 133,421 connections, against 17,000 writes.
The queue cannot produce that: an idle worker asks once every fifteen seconds
and a run publishes a progress line at a time.
It was CrewAI's lock. With REDIS_URL set, CrewAI uses `portalocker.RedisLock` -
a pub/sub lock: `pubsub_numsub`, `client_setname`, `subscribe`, a second
`pubsub_numsub` and an `unsubscribe`, on a pubsub connection opened and closed
around them, with a thread polling every 100ms while it is held. One is taken
per `Crew(...)` built and another per task output stored, and this platform
builds a crew per model call.
What it guards is a SQLite file in the container's own storage directory, so a
distributed lock has nothing to coordinate. The file backend existed but was
installed only when a probe found Redis unreachable - covering the laptop and
never the server. It is installed always now.
Also: the event stream wrapped a `get_message()` that defaults to timeout=0 in
`wait_for(..., 2.0)`…
The planner no longer receives the evidence it never reads, the quality
pass is off on its own measurements, the outline is held to the number of
مواضيع the page count pays for, a محور is written in one call instead of
one per موضوع, and the writer's model comes from settings.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ContiAI platform: API and queue worker in one container (part 2)