🔧 refactor(endpoints.py): remove unused import of get_cache_service to improve code cleanliness and maintainability
🔧 refactor(schemas.py): make the backend field in ProcessResponse schema optional to handle cases where backend is not provided 🔧 refactor(utils.py): add type hint ignore comment to import statement for Celery to avoid type checking error
This commit is contained in:
parent
c5a6003ef5
commit
a75e80b0f7
3 changed files with 2 additions and 3 deletions
|
|
@ -8,7 +8,6 @@ from langflow.services.database.models.flow import Flow
|
|||
from langflow.processing.process import process_graph_cached, process_tweaks
|
||||
from langflow.services.database.models.user.user import User
|
||||
from langflow.services.getters import (
|
||||
get_cache_service,
|
||||
get_session_service,
|
||||
get_settings_service,
|
||||
get_task_service,
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class ProcessResponse(BaseModel):
|
|||
result: Any
|
||||
id: Optional[str] = None
|
||||
session_id: Optional[str] = None
|
||||
backend: str = None
|
||||
backend: Optional[str] = None
|
||||
|
||||
|
||||
# TaskStatusResponse(
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from typing import TYPE_CHECKING
|
|||
|
||||
if TYPE_CHECKING:
|
||||
with contextlib.suppress(ImportError):
|
||||
from celery import Celery
|
||||
from celery import Celery # type: ignore
|
||||
|
||||
|
||||
def get_celery_worker_status(app: "Celery"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue