wrolpi/modules/inventory
lrnselfreliance 31b47dacf8
The inventory legacy-date repair no longer takes the save lock during import (#915)
MultiFileConfig.initialize() imports every file while holding the shared save
lock, which is not reentrant. The repair added in #901 took that lock again from
inside import_all, so any WROLPi whose inventory still held epoch-second dates
hung every API process at startup.

The repair now only rewrites the in-memory entities during import and records
which inventories changed. import_inventories_config() writes those files once
it runs, outside the lock. A regression test runs initialize() against an
epoch-date file with a timeout.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 11:58:42 -07:00
..
test The inventory legacy-date repair no longer takes the save lock during import (#915) 2026-11-02 11:58:42 -07:00
__init__.py Rebuild Inventory as a config-only system with food catalog and calculators 2026-06-14 17:14:54 -06:00
api.py Add manual import + backup Restore/Merge/Overwrite for inventory configs 2026-06-19 16:28:11 -06:00
catalog.py Configs without database rows read and validate only; imports run off the event loop (#874) 2026-10-25 15:17:31 -06:00
catalog_defaults.yaml Add a recommended Food Storage example, a Ration tab, and a supply planner 2026-06-19 12:40:30 -06:00
common.py The inventory legacy-date repair no longer takes the save lock during import (#915) 2026-11-02 11:58:42 -07:00
conftest.py Rebuild Inventory as a config-only system with food catalog and calculators 2026-06-14 17:14:54 -06:00
defaults.py Format inventory expiration dates instead of epoch timestamps (#901) 2026-10-31 12:27:21 -06:00
errors.py Remove unused code found by vulture (#885) 2026-10-27 15:50:09 -06:00
migrate.py Format inventory expiration dates instead of epoch timestamps (#901) 2026-10-31 12:27:21 -06:00
schema.py Add manual import + backup Restore/Merge/Overwrite for inventory configs 2026-06-19 16:28:11 -06:00