|
19 | 19 | ) |
20 | 20 |
|
21 | 21 | import google.protobuf.internal.containers |
| 22 | +import temporal_sdk_bridge |
| 23 | +from temporal_sdk_bridge import ( |
| 24 | + CustomSlotSupplier as BridgeCustomSlotSupplier, |
| 25 | +) |
| 26 | +from temporal_sdk_bridge import PollShutdownError |
22 | 27 | from typing_extensions import TypeAlias |
23 | 28 |
|
24 | 29 | import temporalio.api.common.v1 |
|
29 | 34 | import temporalio.bridge.proto.workflow_activation |
30 | 35 | import temporalio.bridge.proto.workflow_completion |
31 | 36 | import temporalio.bridge.runtime |
32 | | -import temporalio.bridge.temporal_sdk_bridge |
33 | 37 | import temporalio.converter |
34 | 38 | import temporalio.exceptions |
35 | | -from temporalio.bridge.temporal_sdk_bridge import ( |
36 | | - CustomSlotSupplier as BridgeCustomSlotSupplier, |
37 | | -) |
38 | | -from temporalio.bridge.temporal_sdk_bridge import PollShutdownError |
39 | 39 |
|
40 | 40 |
|
41 | 41 | @dataclass |
@@ -111,26 +111,22 @@ class Worker: |
111 | 111 | def create(client: temporalio.bridge.client.Client, config: WorkerConfig) -> Worker: |
112 | 112 | """Create a bridge worker from a bridge client.""" |
113 | 113 | return Worker( |
114 | | - temporalio.bridge.temporal_sdk_bridge.new_worker( |
115 | | - client._runtime._ref, client._ref, config |
116 | | - ) |
| 114 | + temporal_sdk_bridge.new_worker(client._runtime._ref, client._ref, config) |
117 | 115 | ) |
118 | 116 |
|
119 | 117 | @staticmethod |
120 | 118 | def for_replay( |
121 | 119 | runtime: temporalio.bridge.runtime.Runtime, |
122 | 120 | config: WorkerConfig, |
123 | | - ) -> Tuple[Worker, temporalio.bridge.temporal_sdk_bridge.HistoryPusher]: |
| 121 | + ) -> Tuple[Worker, temporal_sdk_bridge.HistoryPusher]: |
124 | 122 | """Create a bridge replay worker.""" |
125 | 123 | [ |
126 | 124 | replay_worker, |
127 | 125 | pusher, |
128 | | - ] = temporalio.bridge.temporal_sdk_bridge.new_replay_worker( |
129 | | - runtime._ref, config |
130 | | - ) |
| 126 | + ] = temporal_sdk_bridge.new_replay_worker(runtime._ref, config) |
131 | 127 | return Worker(replay_worker), pusher |
132 | 128 |
|
133 | | - def __init__(self, ref: temporalio.bridge.temporal_sdk_bridge.WorkerRef) -> None: |
| 129 | + def __init__(self, ref: temporal_sdk_bridge.WorkerRef) -> None: |
134 | 130 | """Create SDK core worker from a bridge worker.""" |
135 | 131 | self._ref = ref |
136 | 132 |
|
|
0 commit comments