ncolony/httpcheck.py
def check(settings, states, location):
    """Check all processes"""
    children = {child.basename(): child for child in location.children()}
    last = set(states)
    current = set(children)
    gone = last - current
    added = current - last
    for name in gone:
        states[name].close()
        del states[name]
    for name in added:
        states[name] = State(location=children[name], settings=settings)
    return [name for name, state in six.iteritems(states) if state.check()]
def check(settings, states, location):
    """Check all processes"""
    children = {child.basename(): child for child in location.children()}
    last = set(states)
    current = set(children)
    gone = last - current
    added = current - last
    for name in gone:
        states[name].close()
        del states[name]
    for name in added:
        states[name] = State(location=children[name], settings=settings)
    return [name for name, state in six.iteritems(states) if state.check()]
Check all processes