fix(backend): Avoid broken process pool by not failing process initializer (#9907)

Process initializer on the process pool should never fail, but we do
network-related stuff there.
This cause the pool to be in a broken state.

### Changes 🏗️

Remove the health check step on process initializer.

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [x] Existing CI test
This commit is contained in:
Zamil Majdy
2025-05-05 20:27:04 +07:00
committed by GitHub
parent afb66f75ec
commit 79319ad1a7
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