Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
Adds a watcher.

Options:

- **name**: name of the watcher to add
- **cmd**: command to run.
- all other options defined in the Watcher constructor.

src/c/i/circus-HEAD/circus/tests/test_arbiter.py   circus(Download)
        arbiter = Arbiter([], controller, sub, loop=get_ioloop(),
                          check_delay=-1)
        arbiter.add_watcher('foo', 'sleep 5')
        try:
            yield arbiter.start()
    def test_start_arbiter_with_autostart(self):
        arbiter = Arbiter([], DEFAULT_ENDPOINT_DEALER, DEFAULT_ENDPOINT_SUB,
                          loop=get_ioloop(),
                          check_delay=-1)
        arbiter.add_watcher('foo', 'sleep 5', autostart=False)

src/c/i/circus-0.10.0/circus/tests/test_arbiter.py   circus(Download)
    def test_add_watcher(self):
        arbiter = Arbiter([], DEFAULT_ENDPOINT_DEALER, DEFAULT_ENDPOINT_SUB,
                          loop=tornado.ioloop.IOLoop.instance(),
                          check_delay=-1)
        arbiter.add_watcher('foo', 'sleep 5')