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:
Will Miao
2026-06-17 08:22:24 +08:00
parent 0906c484e9
commit 8c4b9a1e70
3 changed files with 17 additions and 7 deletions

View File

@@ -1861,7 +1861,9 @@ class ModelCivitaiHandler:
return web.json_response(result)
except Exception as exc:
self._logger.error(
"Error in fetch_all_civitai for %ss: %s", self._service.model_type, exc
"Error in fetch_all_civitai for %ss: %s",
self._service.model_type, exc,
exc_info=True,
)
return web.Response(text=str(exc), status=500)