From 019eb7f25e5cda65c1c5c65fe8cb47cb86cb76ed Mon Sep 17 00:00:00 2001 From: Marius Mateescu Date: Fri, 6 Sep 2024 11:03:07 +0300 Subject: [PATCH] feat: use sorting from configuration in external task client --- camunda/client/external_task_client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/camunda/client/external_task_client.py b/camunda/client/external_task_client.py index 6bef89f..202ec27 100644 --- a/camunda/client/external_task_client.py +++ b/camunda/client/external_task_client.py @@ -25,7 +25,8 @@ class ExternalTaskClient: "timeoutDeltaMillis": 5000, "includeExtensionProperties": True, # enables Camunda Extension Properties "deserializeValues": True, # deserialize values when fetch a task by default - "usePriority": False + "usePriority": False, + "sorting": None } def __init__(self, worker_id, engine_base_url=ENGINE_LOCAL_BASE_URL, config=None): @@ -48,7 +49,8 @@ def fetch_and_lock(self, topic_names, process_variables=None, variables=None): "maxTasks": self.config["maxTasks"], "topics": self._get_topics(topic_names, process_variables, variables), "asyncResponseTimeout": self.config["asyncResponseTimeout"], - "usePriority": self.config["usePriority"] + "usePriority": self.config["usePriority"], + "sorting": self.config["sorting"] } if self.is_debug: