We use atomic versioning to ensure that started tasks are not affected by changes to the task code.
20240313.1
- March 13th, 2024, version 120240313.2
- March 13th, 2024, version 220240314.1
- March 14th, 2024, version 120240313.1
in both the dev
and prod
environments.
Trigger function | Parent task version | Child task version | isLocked |
---|---|---|---|
trigger() | 20240313.2 | Latest | No |
batchTrigger() | 20240313.2 | Latest | No |
triggerAndWait() | 20240313.2 | 20240313.2 | Yes |
batchTriggerAndWait() | 20240313.2 | 20240313.2 | Yes |
npx trigger.dev dev
), every relevant code change automatically creates a new version of all tasks.
So a task run will continue running on the version it was locked to. We do this by spawning a new process for each task run. This ensures that the task run is not affected by changes to the code.
maxAttempts
to 0. Retries are locked to the original version of the run.