|
8 | 8 | from typing import Dict, List, Optional, Set, Tuple
|
9 | 9 |
|
10 | 10 | import grpc
|
| 11 | +from google.protobuf import any_pb2 as any_pb |
11 | 12 | from typing_extensions import TypeAlias
|
12 | 13 |
|
13 | 14 | import dispatch.sdk.v1.call_pb2 as call_pb
|
@@ -210,7 +211,7 @@ def dispatch_calls(self):
|
210 | 211 | parent_id=request.parent_dispatch_id,
|
211 | 212 | root_id=request.root_dispatch_id,
|
212 | 213 | function=request.function,
|
213 |
| - coroutine_state=response.poll.coroutine_state, |
| 214 | + typed_coroutine_state=response.poll.typed_coroutine_state, |
214 | 215 | waiting={},
|
215 | 216 | results={},
|
216 | 217 | )
|
@@ -282,7 +283,7 @@ def dispatch_calls(self):
|
282 | 283 | root_dispatch_id=poller.root_id,
|
283 | 284 | function=poller.function,
|
284 | 285 | poll_result=poll_pb.PollResult(
|
285 |
| - coroutine_state=poller.coroutine_state, |
| 286 | + typed_coroutine_state=poller.typed_coroutine_state, |
286 | 287 | results=poller.results.values(),
|
287 | 288 | ),
|
288 | 289 | )
|
@@ -354,7 +355,7 @@ class Poller:
|
354 | 355 |
|
355 | 356 | function: str
|
356 | 357 |
|
357 |
| - coroutine_state: bytes |
| 358 | + typed_coroutine_state: any_pb.Any |
358 | 359 | # TODO: support max_wait/min_results/max_results
|
359 | 360 |
|
360 | 361 | waiting: Dict[DispatchID, call_pb.Call]
|
|
0 commit comments