Follow up on #375 review: dedupe live-data route and harden serializers.

Align full /api/live-data with slow-tier orjson options, remove dead main.py duplicate, cap slow batches to pool size, cancel queued work on timeout, and stop retrying HTTP 4xx/5xx.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
BigBodyCobain
2026-06-06 20:10:59 -06:00
co-authored by Cursor
parent 9a0a9a116a
commit bd81a940ff
7 changed files with 100 additions and 27 deletions
+5 -1
View File
@@ -561,7 +561,11 @@ async def live_data(request: Request):
payload = get_latest_data_deepcopy_snapshot()
return Response(
content=orjson.dumps(_sanitize_payload(payload)),
content=orjson.dumps(
_sanitize_payload(payload),
default=str,
option=orjson.OPT_NON_STR_KEYS,
),
media_type="application/json",
headers={"ETag": etag, "Cache-Control": "no-cache"},
)