@synchronized("arbiter_add_watcher")
    def add_watcher(self, name, cmd, **kw):
        if name in self._watchers_names:
            raise AlreadyExist("%r already exist" % name)

        if not name:
            return ValueError("command name shouldn't be empty")

        watcher = Watcher(name, cmd, **kw)
        if self.evpub_socket is not None:
            watcher.initialize(self.evpub_socket, self.sockets, self)
        self.watchers.append(watcher)
        self._watchers_names[watcher.name.lower()] = watcher
        return watcher
Adds a watcher.
dataset/ETHPy150Open circus-tent/circus/circus/arbiter.py/Arbiter.add_watcher