Skip to content

Commit 9fb79ef

Browse files
committed
Fix the mock dispatch service so it works with typed_coroutine_state
1 parent 2c2bde3 commit 9fb79ef

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/dispatch/test/service.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import Dict, List, Optional, Set, Tuple
99

1010
import grpc
11+
from google.protobuf import any_pb2 as any_pb
1112
from typing_extensions import TypeAlias
1213

1314
import dispatch.sdk.v1.call_pb2 as call_pb
@@ -210,7 +211,7 @@ def dispatch_calls(self):
210211
parent_id=request.parent_dispatch_id,
211212
root_id=request.root_dispatch_id,
212213
function=request.function,
213-
coroutine_state=response.poll.coroutine_state,
214+
typed_coroutine_state=response.poll.typed_coroutine_state,
214215
waiting={},
215216
results={},
216217
)
@@ -282,7 +283,7 @@ def dispatch_calls(self):
282283
root_dispatch_id=poller.root_id,
283284
function=poller.function,
284285
poll_result=poll_pb.PollResult(
285-
coroutine_state=poller.coroutine_state,
286+
typed_coroutine_state=poller.typed_coroutine_state,
286287
results=poller.results.values(),
287288
),
288289
)
@@ -354,7 +355,7 @@ class Poller:
354355

355356
function: str
356357

357-
coroutine_state: bytes
358+
typed_coroutine_state: any_pb.Any
358359
# TODO: support max_wait/min_results/max_results
359360

360361
waiting: Dict[DispatchID, call_pb.Call]

0 commit comments

Comments
 (0)