File tree 1 file changed +3
-14
lines changed
1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -205,13 +205,11 @@ async def run(
205
205
request_cancel : bool ,
206
206
task_queue : str ,
207
207
) -> MyOutput :
208
- operation = self ._get_operation (input )
209
208
op_handle = await self .nexus_service .start_operation (
210
- operation ,
209
+ self . _get_operation ( input ) ,
211
210
input ,
212
211
headers = input .start_options .headers ,
213
212
)
214
- print (f"π { 'after await start' :<24} : { op_handle } " )
215
213
self ._nexus_operation_started = True
216
214
if isinstance (input .response_type , SyncResponse ):
217
215
assert op_handle .operation_token is None
@@ -221,18 +219,9 @@ async def run(
221
219
if request_cancel :
222
220
# Even for SyncResponse, the op_handle future is not done at this point; that
223
221
# transition doesn't happen until the handle is awaited.
224
- print (f"π { 'before op_handle.cancel' :<24} : { op_handle } " )
225
- cancel_ret = op_handle .cancel ()
226
- print (f"π { 'cancel returned' :<24} : { cancel_ret } " )
222
+ assert op_handle .cancel ()
227
223
228
- print (f"π { 'before await op_handle' :<24} : { op_handle } " )
229
- try :
230
- output = await op_handle
231
- except Exception as e :
232
- print (f"π { 'await op_handle failed' :<24} : { e .__class__ } ({ e } )" )
233
- raise
234
- print (f"π { 'after await op_handle' :<24} : { op_handle } -> { output } " )
235
- return output
224
+ return await op_handle
236
225
237
226
@workflow .update
238
227
async def wait_nexus_operation_started (self ) -> None :
You canβt perform that action at this time.
0 commit comments