Skip to content

Commit 1a17dbf

Browse files
author
Hossein Kavianihamedani
committed
Fix: Convert has_fetcher and get_fetcher_count to async
Monarch actors require all endpoints to be either sync or async, not mixed. This change makes has_fetcher and get_fetcher_count async to match other endpoints in GlobalLoggingActor, preventing actor deadlock errors.
1 parent b78d82b commit 1a17dbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/forge/observability/metric_actors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,12 @@ def extract_values_from_valuemesh(results) -> list[dict[str, Any]]:
437437
await backend.log_batch(reduced_metrics, global_step)
438438

439439
@endpoint
440-
def has_fetcher(self, proc_id: str) -> bool:
440+
async def has_fetcher(self, proc_id: str) -> bool:
441441
"""Check if a fetcher is registered with the given proc_id."""
442442
return proc_id in self.fetchers
443443

444444
@endpoint
445-
def get_fetcher_count(self) -> int:
445+
async def get_fetcher_count(self) -> int:
446446
return len(self.fetchers)
447447

448448
@endpoint

0 commit comments

Comments
 (0)