mozilla-services/circus — pull request #162 by themgt (2012-06-16 05:12:05+00:00)
Title: Fire and forget processes

I discussed this idea with Alexis in IRC, but basically this commit is some rough hacking at implementing a way to dynamically "run" processes without "start"ing them (i.e. so they won't be respawned if/when they exit)

the two use cases I've got are:
* running user-entered arbitrary commands, similar to https://devcenter.heroku.com/articles/oneoff-admin-ps
* running scheduled tasks (from a central queue server - the task scripts exit on completion)

This opens a way up to do this from zmq commands (not from a config file, but I can't see a use case for that anyway). Essentially you take a stopped watcher and send a "run" command to it, it uses standard logic to get the processes started up but then sets self.running = true to use to prevent processes from being respawned if they exit after that initial start

I'd be happy to cleanup this code before merging, just looking for some guidance as to whether you'd consider this feature and if this implementation is on the right path