Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit 0d5310c

Browse files
committed
fix: pass max runs and concurrency limit thru
1 parent 3176541 commit 0d5310c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hatchet_sdk/v2/workflows.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ def __init__(
116116
desired_worker_labels: dict[str, DesiredWorkerLabels] = {},
117117
backoff_factor: float | None = None,
118118
backoff_max_seconds: int | None = None,
119+
concurrency__max_runs: int | None = None,
120+
concurrency__limit_strategy: ConcurrencyLimitStrategy | None = None,
119121
) -> None:
120122
self.fn = fn
121123
self.is_async_function = is_async_fn(fn)
@@ -129,8 +131,8 @@ def __init__(
129131
self.desired_worker_labels = desired_worker_labels
130132
self.backoff_factor = backoff_factor
131133
self.backoff_max_seconds = backoff_max_seconds
132-
self.concurrency__max_runs = 1
133-
self.concurrency__limit_strategy = ConcurrencyLimitStrategy.CANCEL_IN_PROGRESS
134+
self.concurrency__max_runs = concurrency__max_runs
135+
self.concurrency__limit_strategy = concurrency__limit_strategy
134136

135137
def call(self, ctx: Context) -> R:
136138
if self.is_async_function:

0 commit comments

Comments
 (0)