@@ -58,7 +58,6 @@ def empty_orchestrator(ctx: task.OrchestrationContext, _):
5858 with worker .TaskHubGrpcWorker (channel_options = channel_options ) as w :
5959 w .add_orchestrator (empty_orchestrator )
6060 w .start ()
61- w .wait_for_ready (timeout = 10 )
6261
6362 # set a custom max send length option
6463 c = client .TaskHubGrpcClient (channel_options = channel_options )
@@ -98,7 +97,6 @@ def sequence(ctx: task.OrchestrationContext, start_val: int):
9897 w .add_orchestrator (sequence )
9998 w .add_activity (plus_one )
10099 w .start ()
101- w .wait_for_ready (timeout = 10 )
102100
103101 with client .TaskHubGrpcClient () as task_hub_client :
104102 id = task_hub_client .schedule_new_orchestration (sequence , input = 1 )
@@ -143,7 +141,6 @@ def orchestrator(ctx: task.OrchestrationContext, input: int):
143141 w .add_activity (throw )
144142 w .add_activity (increment_counter )
145143 w .start ()
146- w .wait_for_ready (timeout = 10 )
147144
148145 with client .TaskHubGrpcClient () as task_hub_client :
149146 id = task_hub_client .schedule_new_orchestration (orchestrator , input = 1 )
@@ -186,7 +183,6 @@ def parent_orchestrator(ctx: task.OrchestrationContext, count: int):
186183 w .add_orchestrator (orchestrator_child )
187184 w .add_orchestrator (parent_orchestrator )
188185 w .start ()
189- w .wait_for_ready (timeout = 10 )
190186
191187 with client .TaskHubGrpcClient () as task_hub_client :
192188 id = task_hub_client .schedule_new_orchestration (parent_orchestrator , input = 10 )
@@ -209,7 +205,6 @@ def orchestrator(ctx: task.OrchestrationContext, _):
209205 with worker .TaskHubGrpcWorker (stop_timeout = 2.0 ) as w :
210206 w .add_orchestrator (orchestrator )
211207 w .start ()
212- w .wait_for_ready (timeout = 10 )
213208
214209 # Start the orchestration and immediately raise events to it.
215210 task_hub_client = client .TaskHubGrpcClient ()
@@ -239,7 +234,6 @@ def orchestrator(ctx: task.OrchestrationContext, _):
239234 with worker .TaskHubGrpcWorker (stop_timeout = 2.0 ) as w :
240235 w .add_orchestrator (orchestrator )
241236 w .start ()
242- w .wait_for_ready (timeout = 10 )
243237
244238 # Start the orchestration and immediately raise events to it.
245239 with client .TaskHubGrpcClient () as task_hub_client :
@@ -265,7 +259,7 @@ def orchestrator(ctx: task.OrchestrationContext, _):
265259 with worker .TaskHubGrpcWorker (stop_timeout = 2.0 ) as w :
266260 w .add_orchestrator (orchestrator )
267261 w .start ()
268- w . wait_for_ready ( timeout = 10 )
262+
269263 with client .TaskHubGrpcClient () as task_hub_client :
270264 id = task_hub_client .schedule_new_orchestration (orchestrator )
271265 state = task_hub_client .wait_for_orchestration_start (id , timeout = 30 )
@@ -304,7 +298,7 @@ def orchestrator(ctx: task.OrchestrationContext, _):
304298 with worker .TaskHubGrpcWorker (stop_timeout = 2.0 ) as w :
305299 w .add_orchestrator (orchestrator )
306300 w .start ()
307- w . wait_for_ready ( timeout = 10 )
301+
308302 with client .TaskHubGrpcClient () as task_hub_client :
309303 id = task_hub_client .schedule_new_orchestration (orchestrator )
310304 state = task_hub_client .wait_for_orchestration_start (id , timeout = 30 )
@@ -348,7 +342,7 @@ def parent_orchestrator(ctx: task.OrchestrationContext, count: int):
348342 w .add_orchestrator (orchestrator_child )
349343 w .add_orchestrator (parent_orchestrator )
350344 w .start ()
351- w . wait_for_ready ( timeout = 10 )
345+
352346 with client .TaskHubGrpcClient () as task_hub_client :
353347 instance_id = task_hub_client .schedule_new_orchestration (
354348 parent_orchestrator , input = 5
@@ -397,7 +391,6 @@ def orchestrator(ctx: task.OrchestrationContext, input: int):
397391 with worker .TaskHubGrpcWorker (stop_timeout = 2.0 ) as w :
398392 w .add_orchestrator (orchestrator )
399393 w .start ()
400- w .wait_for_ready (timeout = 10 )
401394
402395 task_hub_client = client .TaskHubGrpcClient ()
403396 id = task_hub_client .schedule_new_orchestration (orchestrator , input = 0 )
@@ -498,7 +491,6 @@ def throw_activity_with_retry(ctx: task.ActivityContext, _):
498491 w .add_orchestrator (child_orchestrator_with_retry )
499492 w .add_activity (throw_activity_with_retry )
500493 w .start ()
501- w .wait_for_ready (timeout = 10 )
502494
503495 task_hub_client = client .TaskHubGrpcClient ()
504496 id = task_hub_client .schedule_new_orchestration (parent_orchestrator_with_retry )
@@ -529,7 +521,6 @@ def orchestrator_with_non_retryable(ctx: task.OrchestrationContext, _):
529521 w .add_orchestrator (orchestrator_with_non_retryable )
530522 w .add_activity (throw_non_retryable )
531523 w .start ()
532- w .wait_for_ready (timeout = 10 )
533524
534525 task_hub_client = client .TaskHubGrpcClient ()
535526 id = task_hub_client .schedule_new_orchestration (orchestrator_with_non_retryable )
@@ -568,7 +559,6 @@ def throw_activity(ctx: task.ActivityContext, _):
568559 w .add_orchestrator (mock_orchestrator )
569560 w .add_activity (throw_activity )
570561 w .start ()
571- w .wait_for_ready (timeout = 10 )
572562
573563 task_hub_client = client .TaskHubGrpcClient ()
574564 id = task_hub_client .schedule_new_orchestration (mock_orchestrator )
0 commit comments