Skip to content

Commit

Permalink
fix how we find num replicas for endpoints and collectors (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
boetro authored Dec 22, 2023
1 parent 5e959fe commit a899c7b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,12 @@ async def snapshot(self) -> Snapshot:
avg_process_time_millis=0,
)
if self.collector_deployment is not None:
num_replicas = self.collector_deployment.num_replicas
num_replicas = (

Check warning on line 161 in buildflow/core/app/runtime/actors/collector_pattern/receive_process_push_ack.py

View check run for this annotation

Codecov / codecov/patch

buildflow/core/app/runtime/actors/collector_pattern/receive_process_push_ack.py#L161

Added line #L161 was not covered by tests
serve.status()
.applications.get(self.processor_group.group_id, {})
.deployments.get(self.endpoint_deployment.name, {})
.replica_states.get("RUNNING", 0)
)
else:
num_replicas = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,12 @@ async def snapshot(self) -> Snapshot:
avg_process_time_millis=0,
)
if self.endpoint_deployment is not None:
num_replicas = self.endpoint_deployment.num_replicas
num_replicas = (

Check warning on line 149 in buildflow/core/app/runtime/actors/endpoint_pattern/receive_process_respond.py

View check run for this annotation

Codecov / codecov/patch

buildflow/core/app/runtime/actors/endpoint_pattern/receive_process_respond.py#L149

Added line #L149 was not covered by tests
serve.status()
.applications.get(self.processor_group.group_id, {})
.deployments.get(self.endpoint_deployment.name, {})
.replica_states.get("RUNNING", 0)
)
else:
num_replicas = 0

Expand Down

0 comments on commit a899c7b

Please sign in to comment.