Exemplo n.º 1
0
def stdin_write_handler(event, response):
    """ A supervisor eventlistener result handler that accepts a
    special 'STDIN:' result and writes what follows to the STDIN
    of the process associated with the event. """
    if response.startswith("STDIN:"):
        _stdin_write(event.process, response[6:])
    elif response != 'OK':
        raise RejectEvent(response)
Exemplo n.º 2
0
def rejecting_handler(event, result):
    from supervisor.dispatchers import RejectEvent
    raise RejectEvent(result)