ComfyUI/tests-unit/assets_test
Luke Mino-Altherr 3fa52b37ef feat(assets): add background asset seeder for non-blocking startup
- Add AssetSeeder singleton class with thread management and cancellation
- Support IDLE/RUNNING/CANCELLING state machine with thread-safe access
- Emit WebSocket events for scan progress (started, progress, completed, cancelled, error)
- Update main.py to use non-blocking asset_seeder.start() at startup
- Add shutdown() call in finally block for graceful cleanup
- Update POST /api/assets/seed to return 202 Accepted, support ?wait=true
- Add GET /api/assets/seed/status and POST /api/assets/seed/cancel endpoints
- Update test helper to use ?wait=true for synchronous behavior
- Add 17 unit tests covering state transitions, cancellation, and thread safety
- Log scan configuration (models directory, input/output paths) at scan start

Amp-Thread-ID: https://ampcode.com/threads/T-019c2b45-e6e8-740a-b38b-b11daea8d094
Co-authored-by: Amp <amp@ampcode.com>
2026-02-24 11:34:44 -08:00
..
queries refactor: convert asset tests to table-driven parametrized tests 2026-02-24 11:34:44 -08:00
services refactor: add explicit types to asset service functions 2026-02-24 11:34:44 -08:00
conftest.py chore: remove unused re-exports from conftest.py 2026-02-24 11:34:44 -08:00
helpers.py feat(assets): add background asset seeder for non-blocking startup 2026-02-24 11:34:44 -08:00
test_assets_missing_sync.py fix: resolve test import errors and module collision in assets_test 2026-02-24 11:34:44 -08:00
test_crud.py refactor: convert asset tests to table-driven parametrized tests 2026-02-24 11:34:44 -08:00
test_downloads.py fix: resolve test import errors and module collision in assets_test 2026-02-24 11:34:44 -08:00
test_list_filter.py refactor: convert asset tests to table-driven parametrized tests 2026-02-24 11:34:44 -08:00
test_metadata_filters.py Assets Part 2 - add more endpoints (#12125) 2026-01-31 02:22:05 -05:00
test_prune_orphaned_assets.py fix: resolve test import errors and module collision in assets_test 2026-02-24 11:34:44 -08:00
test_tags_api.py fix: resolve test import errors and module collision in assets_test 2026-02-24 11:34:44 -08:00
test_uploads.py Assets Part 2 - add more endpoints (#12125) 2026-01-31 02:22:05 -05:00