How persistent tasks work
mainIn Turbowatch, tasks can be categorized as either Persistent or Non-Persistent.
- Persistent Tasks: These are long-running processes that do not exit on their own, such as a development server (
next dev) or a process in--watchmode. You must setpersistent: truefor these. - Non-Persistent Tasks: These are tasks that run to completion (e.g., a build script like
tsc).
Behavioral Difference:
If a task is marked as persistent: false (the default), Turbowatch will ignore new FileChangeEvents if the current onChange routine is still executing and interruptible is set to false. This prevents overlapping executions of build scripts.