How to control running watches/processes in circus from Python

1.3k Views Asked by At

I am running few custom Python processes using circusd and ini file:

[circus]
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
check_delay = 5
logoutput = /var/log/circus.log

[watcher:test-worker]
working_dir = /home/ubuntu/app
cmd = python
args = test.py
numprocesses = 1

I can control these watchers using circusctl:

circusctl 0.14.0
(circusctl) list
test-worker
(circusctl) 

But I want to control these (list, start, stop, restart etc) using my Python scripts.

I have checked the documentation Circus for developers, but its examples seems to run processes in different circus context/instance and it doesn't connect to the running circusd instance.

0

There are 0 best solutions below