Perpetual Scripts in dev
Hey team! I'm looking to use perpetual scripts to run a job queue listener (similar to this example), but I'd like a clean way to disable it in my dev environment (don't want a perpetual worker constantly running locally).
Is there a recommended pattern for this? Ideally something like:
- A config flag or environment variable that prevents the perpetual script from starting
- Or a way to conditionally enable/disable perpetual scripts per environment
Currently considering just wrapping my listener in an env check, but I think I'll still run into the problem of the job just repeatedly restarting.
Thanks!
Running services with perpetual scripts | Windmill
Perpetual scripts restart upon ending unless canceled.
1 Reply
ah hmm seems like the first run of a perpetual script need to be triggered manually. That kind of solves my problem but brings up another question: When I deploy a new version of a perpetual script, will I have to manually cancel existing runs and then manually start a new one?