Skip to content

Commit d18ddf9

Browse files
committed
chore: trim the debounce changeset to the fix it is
1 parent 435f410 commit d18ddf9

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

.changeset/debounce-max-duration.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@
22
"@trigger.dev/core": patch
33
---
44

5-
Debouncing with a `delay` longer than an hour now works. A hidden server-side limit was releasing debounced runs after an hour, so any `delay` at or above that never got to push its run back at all: every trigger created its own run, with no error and nothing on the run to show the debounce key had been ignored.
5+
Fix `debounce` doing nothing when `delay` was longer than an hour. An undocumented server limit released debounced runs after an hour, so a longer delay could never push its run back and every trigger created its own.
66

7-
That limit is gone. A debounce key with no `maxDelay` now keeps pushing its run back for as long as triggers keep arriving, which means it never executes while they do. Set `maxDelay` when the work has to happen eventually, and keep `delay` well below it, since the room available to push is the gap between the two.
8-
9-
Triggers we know cannot debounce are now rejected instead of quietly doing nothing: a `maxDelay` no longer than the `delay`, an unparseable `maxDelay`, and a `delay` given as a date rather than a duration. Self-hosters who configure a maximum debounce duration get the same treatment for a `delay` at or above it.
10-
11-
```ts
12-
await myTask.trigger(payload, {
13-
debounce: {
14-
key: "conversation-123",
15-
delay: "10s",
16-
maxDelay: "5m",
17-
},
18-
});
19-
```
7+
Debounce keys now keep collapsing triggers for as long as they keep arriving, so set `maxDelay` when the work has to happen eventually. Settings that could never debounce, such as a `maxDelay` no longer than the `delay`, are now rejected rather than quietly ignored.

0 commit comments

Comments
 (0)