Open tarekziade opened 12 years ago
Actually there should be only one watcher bind to a socket so IMHO the watcher management should also make the socket management.
the same socket can be used by two watchers
Ok what about something like that:
[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
stats_endpoint = tcp://127.0.0.1:5557
[watcher:webworker]
cmd = chaussette --fd $(circus.sockets.webapp) app.application
use_sockets = $(circus.sockets.webapp)
numprocesses = 3
[socket:webapp]
host = 127.0.0.1
port = 8080
Yeah that's pretty cool. although I think you can simplify the use_sockets notation. what about:
[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
stats_endpoint = tcp://127.0.0.1:5557
[watcher:yeah]
cmd = script --fds $(circus.sockets.foo),$(circus.sockets.baz)
used_sockets = baz, foo
numprocesses = 3
[watcher:webworker]
cmd = chaussette --fd $(circus.sockets.foo) app.application
used_sockets = foo
numprocesses = 3
[socket:foo]
host = 127.0.0.1
port = 8080
[socket:baz]
host = 127.0.0.1
port = 8888
Then it means we need to manage the number of running process linked to the watcher before to actually stop the socket.
Re #649 I take it that stopsocket and delsocket are waiting to be implemented and that once they are then that will solve my issue?
Yes something like that :)
@tarekziade I see that this is on an 0.9 deadline that has slipped by a few months: is this in-progress at all? I like the ability to add watchers via ZMQ, and it would be equally amazing to do so for sockets!
not sure what to do on the watchers that 'use sockets' - maybe a watcher should tell precisely the socket it uses, so we can coordinate its start/stop with the socket start stop