Skip to content

Commit 6ab22ca

Browse files
committed
simplify
Signed-off-by: pyranota <pyra@duck.com>
1 parent 4990302 commit 6ab22ca

File tree

6 files changed

+22
-83
lines changed

6 files changed

+22
-83
lines changed

docs/core_concepts/22_job_debouncing/index.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
# Job debouncing
22

3-
Job debouncing prevents redundant job executions by canceling pending jobs with identical characteristics when new ones are submitted within a specified time window. This feature helps optimize resource usage and prevents unnecessary duplicate computations.
3+
When job debouncing is enabled, started jobs are scheduled for a specified future time. If another job with the same debounce key is queued within this duration, it will "debounce" the previous job by canceling it.
44

5-
Job debouncing is a [Cloud plans and Pro Enterprise Self-Hosted](/pricing) only.
5+
Job debouncing is a [Cloud plans and Pro Enterprise Self-Hosted](/pricing) only feature.
66

7-
Debouncing can be set from the Settings menu. When jobs with matching characteristics are submitted within the debounce window, pending jobs are automatically canceled in favor of the newest one.
7+
It is available for scripts and flows and can be set from the Settings menu. It also operates globally and involves several configuration fields:
88

9-
The Job debouncing operates globally and across flow runs. It involves two key parameters:
9+
## Configuration fields
1010

11-
## Debounce delay in seconds
11+
### Debounce delay in seconds
1212

13-
Set in seconds, the time window defines the period during which duplicate jobs are canceled. When a new job arrives within this window with matching characteristics, any pending jobs are canceled.
13+
The time window in seconds for debouncing. If not set, the job will not debounce existing jobs and will not be cancelled by any other job.
1414

15-
## Custom debounce key
15+
### Custom debounce key
1616

17-
This parameter is optional. Debounce keys are global, you can have them be workspace specific using the variable `$workspace`. You can also use an argument's value using `$args[name_of_arg]`.
17+
Optional field to create debounce keys that are not bound to path and arguments. If not set, the default debounce key is used, which is composed of workspace ID, runnable path, and argument values passed to it.
1818

19-
## Dependency jobs
19+
Debouncing keys are global, you can have them be workspace specific using the variable `$workspace`. You can also use an argument's value using `$args[name_of_arg]`.
2020

21-
For dependency jobs, debouncing is enabled by default. This prevents redundant dependency computations when multiple jobs require the same dependencies.
21+
### Max total debouncing time
2222

23-
## Job debouncing in Script & Flows
23+
How long (in seconds) a job can be debounced by the same key. If exceeded, new jobs with the same key will not debounce existing jobs and let them execute, while still scheduling themselves for future execution.
2424

25-
### Job debouncing of a script
25+
### Max total debounces amount
2626

27-
[Job debouncing of a script](../../script_editor/settings.mdx#debouncing) can be set from the [Settings](../../script_editor/settings.mdx) menu. Pick "Runtime" and then "Debouncing" and define a time window and optionally a custom debounce key.
27+
Same as previous one, but counts debounces instead of time.
2828

29-
### Job debouncing of a flow
29+
### Debounce args to accumulate
30+
31+
This field allows you to consolidate arguments across debounced jobs. If one of your main function arguments takes an array of any type, you can specify this argument in this parameter. This will exclude it from the default debounce key and when the job executes, it will concatenate all values of the specified argument from previous jobs related to this debouncing period.
3032

31-
From the Flow Settings Advanced menu, pick "Debouncing" and define a time window and optionally a custom debounce key.

docs/flows/1_flow_editor.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ The Flow editor has the following features which are the subject of specific pag
151151
color="teal"
152152
title="Job debouncing"
153153
description="Job debouncing prevents redundant job executions by canceling pending jobs with identical characteristics."
154-
href="/docs/flows/job_debouncing"
154+
href="/docs/core_concepts/job_debouncing"
155155
/>
156156
<DocCard
157157
color="teal"

docs/flows/23_job_debouncing.mdx

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/script_editor/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ The Script editor is made of the following features:
122122
description="The Concurrency limit feature allows you to define concurrency limits for scripts and inline scripts within flows."
123123
href="/docs/script_editor/concurrency_limit"
124124
/>
125+
<DocCard
126+
title="Job debouncing"
127+
description="Job debouncing prevents redundant job executions by canceling pending jobs with identical characteristics."
128+
href="/docs/core_concepts/job_debouncing"
129+
/>
125130
<DocCard
126131
title="Running services with perpetual scripts"
127132
description="Perpetual scripts restart upon ending unless canceled."

docs/script_editor/job_debouncing.mdx

Lines changed: 0 additions & 35 deletions
This file was deleted.

sidebars.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,6 @@ const sidebars = {
720720
'script_editor/script_kinds',
721721
'script_editor/customize_ui',
722722
'script_editor/concurrency_limit',
723-
'script_editor/job_debouncing',
724723
'script_editor/perpetual_scripts',
725724
'script_editor/custom_environment_variables',
726725
'script_editor/multiplayer',
@@ -748,7 +747,6 @@ const sidebars = {
748747
'flows/flow_trigger',
749748
'flows/retries',
750749
'flows/concurrency_limit',
751-
'flows/job_debouncing',
752750
'flows/custom_timeout',
753751
'flows/priority',
754752
'flows/lifetime',

0 commit comments

Comments
 (0)