

@gen.coroutine
@util.debuglog
def _start(self):
    'Start.\n        '
    if self.pending_socket_event:
        return
    if (not self.is_stopped()):
        if (len(self.processes) < self.numprocesses):
            self.reap_processes()
            (yield self.spawn_processes())
        return
    found_wids = len(self._found_wids)
    if ((not self._found_wids) and (not self.call_hook('before_start'))):
        logger.debug('Aborting startup')
        return
    self._status = 'starting'
    if (self.stdout_stream and hasattr(self.stdout_stream, 'open')):
        self.stdout_stream.open()
    if (self.stderr_stream and hasattr(self.stderr_stream, 'open')):
        self.stderr_stream.open()
    self._create_redirectors()
    self.reap_processes()
    (yield self.spawn_processes())
    if ((not self.processes) or (not self.call_hook('after_start'))):
        logger.debug('Aborting startup')
        (yield found_wids._stop(True))
        return
    self._status = 'active'
    if found_wids:
        logger.info(('%s already running' % self.name))
    else:
        logger.info(('%s started' % self.name))
    self.notify_event('start', {
        'time': time.time(),
    })

dataset/ETHPy150Open circus-tent/circus/circus/watcher.py Watcher._start/VarMisuse@232/303 `self`->`found_wids`