🔧 chore(main.py): import Engine from langflow.database.base to fix missing reference error
✨ feat(main.py): add Engine.update as a startup event to update the engine on app startup
This commit is contained in:
parent
cfe8d02be0
commit
f0f77a79fd
1 changed files with 2 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ from fastapi.responses import FileResponse
|
|||
from fastapi.staticfiles import StaticFiles
|
||||
|
||||
from langflow.api import router
|
||||
from langflow.database.base import create_db_and_tables
|
||||
from langflow.database.base import create_db_and_tables, Engine
|
||||
from langflow.interface.utils import setup_llm_caching
|
||||
from langflow.utils.logger import configure
|
||||
|
||||
|
|
@ -34,6 +34,7 @@ def create_app():
|
|||
)
|
||||
|
||||
app.include_router(router)
|
||||
app.on_event("startup")(Engine.update)
|
||||
app.on_event("startup")(create_db_and_tables)
|
||||
app.on_event("startup")(setup_llm_caching)
|
||||
return app
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue