🔥 refactor(main.py): remove unused import and initialize_database function call to improve code cleanliness and remove unnecessary database initialization
🔥 refactor(main.py): remove initialize_database function call from app startup event to improve code cleanliness and remove unnecessary database initialization 🔥 refactor(base.py): remove unused teardown method and add set_ready method to improve code cleanliness and provide a way to set service readiness
This commit is contained in:
parent
f5c20ac166
commit
4aaeda8aa8
2 changed files with 4 additions and 2 deletions
|
|
@ -9,7 +9,6 @@ from langflow.api import router
|
|||
|
||||
|
||||
from langflow.interface.utils import setup_llm_caching
|
||||
from langflow.services.database.utils import initialize_database
|
||||
from langflow.services.utils import initialize_services
|
||||
from langflow.services.plugins.langfuse import LangfuseInstance
|
||||
from langflow.services.utils import (
|
||||
|
|
@ -42,7 +41,6 @@ def create_app():
|
|||
app.include_router(router)
|
||||
|
||||
app.on_event("startup")(initialize_services)
|
||||
app.on_event("startup")(initialize_database)
|
||||
app.on_event("startup")(setup_llm_caching)
|
||||
app.on_event("startup")(LangfuseInstance.update)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@ from abc import ABC
|
|||
|
||||
class Service(ABC):
|
||||
name: str
|
||||
ready: bool = False
|
||||
|
||||
def teardown(self):
|
||||
pass
|
||||
|
||||
def set_ready(self):
|
||||
self.ready = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue