@@ -119,7 +119,6 @@ def __init__(
119119 max_concurrent_workflow_tasks : Optional [int ] = None ,
120120 max_concurrent_activities : Optional [int ] = None ,
121121 max_concurrent_local_activities : Optional [int ] = None ,
122- max_concurrent_nexus_tasks : Optional [int ] = None ,
123122 tuner : Optional [WorkerTuner ] = None ,
124123 max_concurrent_workflow_task_polls : Optional [int ] = None ,
125124 nonsticky_to_sticky_poll_ratio : float = 0.2 ,
@@ -215,16 +214,13 @@ def __init__(
215214 max_concurrent_workflow_tasks: Maximum allowed number of workflow
216215 tasks that will ever be given to this worker at one time. Mutually exclusive with
217216 ``tuner``. Must be set to at least two if ``max_cached_workflows`` is nonzero.
218- max_concurrent_activities: Maximum number of activity tasks that will ever be given to
219- the activity worker concurrently. Mutually exclusive with ``tuner``.
217+ max_concurrent_activities: Maximum number of activity tasks that
218+ will ever be given to the activity worker concurrently. Mutually exclusive with ``tuner``.
220219 max_concurrent_local_activities: Maximum number of local activity
221- tasks that will ever be given to the activity worker concurrently. Mutually
222- exclusive with ``tuner``.
223- max_concurrent_nexus_tasks: Maximum number of Nexus tasks that will ever be given to
224- the Nexus worker concurrently. Mutually exclusive with ``tuner``.
220+ tasks that will ever be given to the activity worker concurrently. Mutually exclusive with ``tuner``.
225221 tuner: Provide a custom :py:class:`WorkerTuner`. Mutually exclusive with the
226- ``max_concurrent_workflow_tasks``, ``max_concurrent_activities``,
227- ``max_concurrent_local_activities``, and ``max_concurrent_nexus_tasks`` arguments.
222+ ``max_concurrent_workflow_tasks``, ``max_concurrent_activities``, and
223+ ``max_concurrent_local_activities`` arguments.
228224
229225 Defaults to fixed-size 100 slots for each slot kind if unset and none of the
230226 max_* arguments are provided.
@@ -341,7 +337,6 @@ def __init__(
341337 max_concurrent_workflow_tasks = max_concurrent_workflow_tasks ,
342338 max_concurrent_activities = max_concurrent_activities ,
343339 max_concurrent_local_activities = max_concurrent_local_activities ,
344- max_concurrent_nexus_tasks = max_concurrent_nexus_tasks ,
345340 tuner = tuner ,
346341 max_concurrent_workflow_task_polls = max_concurrent_workflow_task_polls ,
347342 nonsticky_to_sticky_poll_ratio = nonsticky_to_sticky_poll_ratio ,
@@ -392,6 +387,7 @@ def _init_from_config(self, client: temporalio.client.Client, config: WorkerConf
392387 """
393388 self ._config = config
394389
390+ # TODO(nexus-preview): max_concurrent_nexus_tasks / tuner support
395391 if not (
396392 config ["activities" ]
397393 or config ["nexus_service_handlers" ]
@@ -466,7 +462,6 @@ def _init_from_config(self, client: temporalio.client.Client, config: WorkerConf
466462 )
467463 self ._nexus_worker : Optional [_NexusWorker ] = None
468464 if config ["nexus_service_handlers" ]:
469- # TODO(nexus-preview) analogous calculations to those done for activity?
470465 self ._nexus_worker = _NexusWorker (
471466 bridge_worker = lambda : self ._bridge_worker ,
472467 client = config ["client" ],
@@ -527,19 +522,16 @@ def check_activity(activity):
527522 config ["max_concurrent_workflow_tasks" ]
528523 or config ["max_concurrent_activities" ]
529524 or config ["max_concurrent_local_activities" ]
530- or config ["max_concurrent_nexus_tasks" ]
531525 ):
532526 raise ValueError (
533527 "Cannot specify max_concurrent_workflow_tasks, max_concurrent_activities, "
534- "max_concurrent_local_activities, or max_concurrent_nexus_tasks when also "
535- "specifying tuner"
528+ "or max_concurrent_local_activities when also specifying tuner"
536529 )
537530 else :
538531 tuner = WorkerTuner .create_fixed (
539532 workflow_slots = config ["max_concurrent_workflow_tasks" ],
540533 activity_slots = config ["max_concurrent_activities" ],
541534 local_activity_slots = config ["max_concurrent_local_activities" ],
542- nexus_slots = config ["max_concurrent_nexus_tasks" ],
543535 )
544536
545537 bridge_tuner = tuner ._to_bridge_tuner ()
@@ -891,7 +883,6 @@ class WorkerConfig(TypedDict, total=False):
891883 max_concurrent_workflow_tasks : Optional [int ]
892884 max_concurrent_activities : Optional [int ]
893885 max_concurrent_local_activities : Optional [int ]
894- max_concurrent_nexus_tasks : Optional [int ]
895886 tuner : Optional [WorkerTuner ]
896887 max_concurrent_workflow_task_polls : Optional [int ]
897888 nonsticky_to_sticky_poll_ratio : float
0 commit comments