Merge branch 'dev' into abhi/ci-chromatic

This commit is contained in:
Abhimanyu Yadav
2025-05-05 20:45:38 +05:30
committed by GitHub
2 changed files with 7 additions and 3 deletions

View File

@@ -1097,14 +1097,16 @@ class ExecutionManager(AppProcess):
def get_db_client() -> "DatabaseManagerClient":
from backend.executor import DatabaseManagerClient
return get_service_client(DatabaseManagerClient)
# Disable health check for the service client to avoid breaking process initializer.
return get_service_client(DatabaseManagerClient, health_check=False)
@thread_cached
def get_notification_service() -> "NotificationManagerClient":
from backend.notifications import NotificationManagerClient
return get_service_client(NotificationManagerClient)
# Disable health check for the service client to avoid breaking process initializer.
return get_service_client(NotificationManagerClient, health_check=False)
def send_execution_update(entry: GraphExecution | NodeExecutionResult | None):

View File

@@ -247,6 +247,7 @@ ASC = TypeVar("ASC", bound=AppServiceClient)
def get_service_client(
service_client_type: Type[ASC],
call_timeout: int | None = api_call_timeout,
health_check: bool = True,
) -> ASC:
class DynamicClient:
def __init__(self):
@@ -351,7 +352,8 @@ def get_service_client(
return sync_method
client = cast(ASC, DynamicClient())
client.health_check()
if health_check:
client.health_check()
return client