Created
December 5, 2013 19:39
-
-
Save decklord/7812432 to your computer and use it in GitHub Desktop.
Load watcher on running CIRCUS instance.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from circus.client import CircusClient, make_message | |
from circus.util import DEFAULT_ENDPOINT_DEALER | |
client = CircusClient(endpoint=DEFAULT_ENDPOINT_DEALER) | |
virtual_env_dir = "/path/to/.virtualenvs/virtualenv/bin" | |
watcher_options = { | |
"numprocesses": 2, | |
"working_dir": "my/path/to/file", | |
} | |
process = { | |
"name":"Test Print", | |
"options": watcher_options, | |
"executable" : "python", | |
"cmd": "%s/python printer.py" % (virtual_env_dir), | |
"start": True | |
} | |
print client.call(make_message("add", **process)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment