@gen.coroutine
    @util.debuglog
    def spawn_processes(self):
        # when an on_demand process dies, do not restart it until
        # the next event
        if self.pending_socket_event:
            self._status = "stopped"
            return
        for i in self._found_wids:
            self.spawn_process(i)
            yield tornado_sleep(0)
        self._found_wids = {}

        for i in range(self.numprocesses - len(self.processes)):
            res = self.spawn_process()
            if res is False:
                yield self._stop()
                break
            delay = self.warmup_delay
            if isinstance(res, float):
                delay -= (time.time() - res)
                if delay < 0:
                    delay = 0
            yield tornado_sleep(delay)
Spawn processes.
dataset/ETHPy150Open circus-tent/circus/circus/watcher.py/Watcher.spawn_processes