New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fire and forget processes #162
Conversation
+1 for me. Also, I broke a bit the APIs so you will need to adapt your changes to the latest master. I'm hanging on IRC of you need help on that. |
Run a watcher | ||
============================== | ||
|
||
This command runs the process in a watcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's worth mentioning here that this is a "one shot" thing. this is me nitpicking, but mainly this would be something in the lines of "This command runs one watcher's process and does not try to control it in any way". Like you said, this is a fire-n-forget thing, that's worth mentioning here. :-)
@themgt any news on this? I can do the changes otherwise :) |
@ametaireau - yeah, I've been wrapped up in some other coding triage, but I'm planning to get back to this asap |
awesome, thanks! |
I've just added some documentation on how to implement new commands here: http://docs.circus.io/en/latest/adding_new_commands/ |
Any news on this? If not, I think I'll go ahead and make the necessary changes directly before merging :) |
Hey yeah sorry, we would up need to hack up our own thingamabob because of some fairly specific requirements and my lack of python knowledge. If any of this is of use feel free to grab anything you want :) |
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:
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