Files
romm/backend/handler
Stu Anderson 39ed3a05b6 perf(rq): Save 67MB RAM; keep the database and API out of streaming worker's parent (#5755)
* perf(streaming) lazy loading in streaming worker

* perf(rq): push _resolved to test container

* pr-ready: code-review

Move the reaper import guard into test_task_func_paths.py, reusing
BACKEND_ROOT and JOB_ONLY_MODULES, watch socket_handler and lifecycle too,
check the deferred imports still load, and surface stderr on failure.
Explain the lazy socket_handler import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* pr-ready: simplify

Defer the lifecycle import inside _reap instead of wrapping its teardown,
share one subprocess helper between the import guards, and check every
streaming-queue task the PreloadingWorker parent would load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* pr-ready: review-polish

Keep the import-guard helper's docstring to one sentence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* pr-ready: prose

Write the lazy-import and guard comments as full sentences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(streaming): move session notices out of session_store

record_termination and push_to_user deliver over the socket and as
notifications, so they now live in handler/streaming/notices.py with
top-level imports. session_store keeps only the Redis tombstone write
(save_termination) and loads neither the database nor socketio.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 20:30:04 -05:00
..