Skip to content

Commit

Permalink
[Trigger] Add workerTerminationTimeout to KafkaTrigger (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
rokatyy committed Aug 6, 2024
1 parent 7172181 commit ec901e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nuclio/triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -295,6 +298,7 @@ def __init__(
struct = {
"kind": self.kind,
"url": webapi,
"workerTerminationTimeout": worker_termination_timeout,
"attributes": {
"containerName": container,
"streamPath": path,
Expand Down

0 comments on commit ec901e4

Please sign in to comment.