Tasks can now be configured to automatically expire if they wait in the queue for too long. A cascading time-to-live (TTL) system[[/ref:1]] is being introduced, allowing expiration limits to be set globally, per-task, or at the individual trigger level. If a run is not picked up by a worker before the TTL expires, it is permanently removed from the queue.
The resolution logic is designed to maintain high throughput by extracting the TTL during the initial trigger phase without requiring additional database queries[[/ref:2]]. Settings are applied sequentially, with local trigger options overriding task-level rules, which in turn override global settings. To configure it, here is how a global default[[/ref:3]] is set:
1export default defineConfig({2 project: "my-project",3 ttl: "1h",4});