Files
romm/backend
nendo 5bb10dacd1 SaveSync: paginate recompute task scan by primary key
get_all_saves() materialized every Save row across all users into a
single .all() list. On instances with very large libraries that's a
real RAM ceiling and pins every row for the lifetime of the recompute
run.

Replace it with get_saves_after_id(after_id, limit) and have the
recompute task drive keyset pagination in PAGE_SIZE-row chunks. SQLAlchemy
streaming via .execution_options(yield_per=...) is incompatible with the
per-call session lifetime that @begin_session enforces (the session
exits before the consumer iterates), so keyset paging from the caller is
the cleanest fit.

Behavior is unchanged: same row coverage, same idempotency, same
counters. Memory usage drops from O(all saves) to O(PAGE_SIZE).
2026-05-29 17:38:49 +09:00
..
2026-05-21 06:56:36 -04:00
2026-02-09 17:26:21 -05:00
2026-05-20 09:17:35 -04:00
2026-05-24 18:57:38 -04:00
2026-02-03 17:09:21 -05:00
2025-08-02 17:55:43 -04:00
2026-05-27 20:58:33 -04:00
2024-02-10 12:43:39 -05:00
2025-07-05 19:17:40 -04:00
2026-05-17 17:39:47 -04:00
2026-05-22 22:35:30 -04:00