mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-17 07:59:24 -03:00
fix(metadata-sync): persist not-found flags to SQLite cache on deleted-provider path
When a model is already classified as civitai_deleted=True via .metadata.json but re-enters the failure block through the civarchive/sqlite provider path (not the default provider), needs_save was never set to True because civitai_api_not_found and sqlite_attempted were both False. The flags were never persisted to SQLite, causing the model to be re-fetched on every restart. Also demoted duplicate INFO/ERROR logging in fetch_and_update_model to DEBUG (the use case already logs at WARNING), and added exc_info=True to the fetch_all_civitai error handler.
This commit is contained in:
@@ -293,7 +293,8 @@ async def test_fetch_and_update_model_respects_deleted_without_archive():
|
||||
assert "metadata archive DB is not enabled" in error
|
||||
helpers.default_provider_factory.assert_not_awaited()
|
||||
helpers.metadata_manager.hydrate_model_data.assert_not_awaited()
|
||||
update_cache.assert_not_awaited()
|
||||
# Now update_cache_func IS called to persist the not-found flags to SQLite
|
||||
update_cache.assert_awaited_once()
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user