Skip to content

Commit 74f32a4

Browse files
committed
Add changeset
1 parent 3615d65 commit 74f32a4

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.changeset/little-birds-appear.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
"@trigger.dev/sdk": patch
3+
---
4+
5+
Removes the `releaseConcurrencyOnWaitpoint` option on queues and the `releaseConcurrency` option on various wait functions. Replaced with the following default behavior:
6+
7+
- Concurrency is never released when a run is first blocked via a waitpoint, at either the env or queue level.
8+
- Concurrency is always released when a run is checkpointed and shutdown, at both the env and queue level.
9+
10+
Additionally, environment concurrency limits now have a new "Burst Factor", defaulting to 2.0x. The "Burst Factor" allows the environment-wide concurrency limit to be higher than any individual queue's concurrency limit. For example, if you have an environment concurrency limit of 100, and a Burst Factor of 2.0x, then you can execute up to 200 runs concurrently, but any one task/queue can still only execute 100 runs concurrently.
11+
12+
We've done some work cleaning up the run statuses. The new statuses are:
13+
14+
- `PENDING_VERSION`: Task is waiting for a version update because it cannot execute without additional information (task, queue, etc.)
15+
- `QUEUED`: Task is waiting to be executed by a worker
16+
- `DEQUEUED`: Task has been dequeued and is being sent to a worker to start executing.
17+
- `EXECUTING`: Task is currently being executed by a worker
18+
- `WAITING`: Task has been paused by the system, and will be resumed by the system
19+
- `COMPLETED`: Task has been completed successfully
20+
- `CANCELED`: Task has been canceled by the user
21+
- `FAILED`: Task has failed to complete, due to an error in the system
22+
- `CRASHED`: Task has crashed and won't be retried, most likely the worker ran out of resources, e.g. memory or storage
23+
- `SYSTEM_FAILURE`: Task has failed to complete, due to an error in the system
24+
- `DELAYED`: Task has been scheduled to run at a specific time
25+
- `EXPIRED`: Task has expired and won't be executed
26+
- `TIMED_OUT`: Task has reached it's maxDuration and has been stopped
27+
28+
We've removed the following statuses:
29+
30+
- `WAITING_FOR_DEPLOY`: This is no longer used, and is replaced by `PENDING_VERSION`
31+
- `FROZEN`: This is no longer used, and is replaced by `WAITING`
32+
- `INTERRUPTED`: This is no longer used
33+
- `REATTEMPTING`: This is no longer used, and is replaced by `EXECUTING`
34+
35+
We've also added "boolean" helpers to runs returned via the API and from Realtime:
36+
37+
- `isQueued`: Returns true when the status is `QUEUED`, `PENDING_VERSION`, or `DELAYED`
38+
- `isExecuting`: Returns true when the status is `EXECUTING`, `DEQUEUED`. These count against your concurrency limits.
39+
- `isWaiting`: Returns true when the status is `WAITING`. These do not count against your concurrency limits.
40+
- `isCompleted`: Returns true when the status is any of the completed statuses.
41+
- `isCanceled`: Returns true when the status is `CANCELED`
42+
- `isFailed`: Returns true when the status is any of the failed statuses.
43+
- `isSuccess`: Returns true when the status is `COMPLETED`
44+
45+
This change adds the ability to easily detect which runs are being counted against your concurrency limit by filtering for both `EXECUTED` or `DEQUEUED`.

0 commit comments

Comments
 (0)