From ec901e42d3da1f9eef1a940d60cb919d3838154a Mon Sep 17 00:00:00 2001 From: Katerina Molchanova <35141662+rokatyy@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:06:19 +0300 Subject: [PATCH] [Trigger] Add workerTerminationTimeout to KafkaTrigger (#188) --- nuclio/triggers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nuclio/triggers.py b/nuclio/triggers.py index d055e07..bafcab7 100644 --- a/nuclio/triggers.py +++ b/nuclio/triggers.py @@ -180,11 +180,13 @@ def __init__( worker_allocation_mode: str = "pool", fetch_default: int = 1048576, max_workers: int = 1, + worker_termination_timeout: str = "10s", ): super(KafkaTrigger, self).__init__( { "kind": self.kind, "maxWorkers": max_workers, + "workerTerminationTimeout": worker_termination_timeout, "attributes": { "topics": topics, "brokers": brokers, @@ -242,6 +244,7 @@ def __init__( heartbeat_interval: str = "3s", explicit_ack_mode: str = None, extra_attributes=None, + worker_termination_timeout: str = "10s", **deprecated_kwargs, ): # TODO: delete deprecated arguments in 0.10.0 @@ -295,6 +298,7 @@ def __init__( struct = { "kind": self.kind, "url": webapi, + "workerTerminationTimeout": worker_termination_timeout, "attributes": { "containerName": container, "streamPath": path,