Last Wednesday, the 31st of October, we (with Rémy Hubscher, from Novapost, Alexis Métaireau and Tarek Ziade from Mozilla) sprinted for the second time on Circus. If you wish to have a preview of the first sprint, head on to Alexis' blog.
Try it out!
It displays a "supervisorctl-like" CLI when no commands or options are provided, and is based on the CmdModule.
What this allows is to plug callback functions at various places during the watcher startup and shutdown process:
As explained in the docs, this could help you make sure that one watcher is started (eg Redis in the example given) before starting another one.
Respawn = False
The idea we came up with is that you could have a respawn = False option for a watcher. When a process is started on a watcher with respawn = False, it'll behave in the same way as usual, but for one detail: a process won't be restarted automatically if it dies.
Everything else remains the same, but that allows you to configure watchers with processes that are "one shot", for example cron commands or simple scripts, without having them to be daemons.
There's still some discussion going on for this feature:
- should the watcher be a different class, ie a OneShotWatcher?
- is it possible to "re-fire" processes on such a watcher? If so, how? Using the reload command?
- if one-shot processes can be "re-fired", should numprocesses processes be fired, or only numprocesses - current number of running processes?
As for the first sprint, this was a real pleasure, and we're all looking forward to the next sprint! By then, if you feel like playing with Circus, giving it a try, or even contributing, feel free to come and say hi on irc, in #mozilla-circus at freenode!