mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-03 13:19:23 +08:00
chore(assets): log when assets disabled due to missing DB deps
Addresses CodeRabbit review: the missing-optional-dependency fallback in setup_database() silently disabled the assets system with no startup message, unlike the exception path which logs. Add a warning so operators can tell why /api/assets/* returns 503.
This commit is contained in:
parent
a5ff07fe63
commit
d224df799b
1
main.py
1
main.py
@ -464,6 +464,7 @@ def setup_database():
|
|||||||
# Optional DB dependencies are missing, so init_db() is skipped and the
|
# Optional DB dependencies are missing, so init_db() is skipped and the
|
||||||
# asset backend has no database. Disable assets so /api/assets/* returns
|
# asset backend has no database. Disable assets so /api/assets/* returns
|
||||||
# a clean 503 instead of 500s against an uninitialized DB.
|
# a clean 503 instead of 500s against an uninitialized DB.
|
||||||
|
logging.warning("Optional database dependencies are missing; assets system disabled.")
|
||||||
disable_assets_routes()
|
disable_assets_routes()
|
||||||
asset_seeder.disable()
|
asset_seeder.disable()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user