LeoVasanko
d5ff7757c8
Preview: persistent worker pool, fast AVIF encode, access-log timing
- Add preview_worker.py: long-lived subprocess; JSONL request / framed binary
response protocol (BLAKE3 checksum + LE uint32 sizes + msgspec JSON + payload)
- Add _PreviewWorkerPool: asyncio queue-based pool; kill+replace workers on timeout,
checksum error, or protocol error; PREVIEW_TIMEOUT=3s, PREVIEW_WORKERS=cpu-scaled
- Use pyvips effort=0,strip=True for fast AVIF thumbnails; CISTA_PIL=1 env forces Pillow
- Report load/process/save ms in PreviewResponse; inject into access log via req.ctx._log_extra
- Wire start/shutdown_preview_workers into Sanic lifecycle hooks (app.py)
- Call configure_main_logging() after Sanic() to install emoji formatter
- Silence worker stderr (DEVNULL)
2026-04-24 23:53:23 +00:00
..
2026-04-23 18:06:22 +00:00
2023-11-08 20:38:40 +00:00
2026-02-05 20:01:26 +00:00
2026-02-04 20:24:21 +00:00
2026-04-24 23:53:23 +00:00
2026-02-04 20:35:29 +00:00
2026-01-31 00:47:04 +00:00
2023-11-08 20:38:40 +00:00
2023-11-13 18:00:44 +00:00
2026-04-24 23:53:23 +00:00
2026-04-24 23:53:23 +00:00
2026-02-04 18:54:54 +00:00
2026-04-24 23:52:34 +00:00
2026-04-23 18:06:22 +00:00
2023-10-26 11:18:59 +00:00
2023-11-08 20:38:40 +00:00
2026-02-10 23:56:42 +00:00
2026-02-05 20:31:46 +00:00