

@gen.coroutine
@util.debuglog
def remove_expired_processes(self):
    expired_processes = [p for p in self.processes.values() if (p.age() > (self.max_age + randint(0, self.max_age_variance)))]
    removes = (yield [self.kill_process(x) for x in expired_processes])
    for (i, process) in enumerate(expired_processes):
        if removes[i]:
            self.processes.pop(process.pid)

dataset/ETHPy150Open circus-tent/circus/circus/watcher.py Watcher.remove_expired_processes/original