twisted / ampoule

Process pool for Twisted, using AMP
Other
12 stars 19 forks source link

ampoule doesn't handle childConnectionLost #36

Open graingert opened 4 years ago

graingert commented 4 years ago
/opt/001-python/lib/python3.8/site-packages/ampoule/pool.py:397: in stop
    l = [self.stopAWorker(process) for process in self.processes]
/opt/001-python/lib/python3.8/site-packages/ampoule/pool.py:397: in <listcomp>
    l = [self.stopAWorker(process) for process in self.processes]
/opt/001-python/lib/python3.8/site-packages/ampoule/pool.py:351: in stopAWorker
    child.callRemote(commands.Shutdown
/opt/001-python/lib/python3.8/site-packages/twisted/protocols/amp.py:969: in callRemote
    return co._doCommand(self)
/opt/001-python/lib/python3.8/site-packages/twisted/protocols/amp.py:1998: in _doCommand
    d = proto._sendBoxCommand(self.commandName,
/opt/001-python/lib/python3.8/site-packages/twisted/protocols/amp.py:900: in _sendBoxCommand
    box._sendTo(self.boxSender)
/opt/001-python/lib/python3.8/site-packages/twisted/protocols/amp.py:723: in _sendTo
    proto.sendBox(self)
/opt/001-python/lib/python3.8/site-packages/twisted/protocols/amp.py:2384: in sendBox
    self.transport.write(box.serialize())
/opt/001-python/lib/python3.8/site-packages/ampoule/main.py:82: in write
    self.transport.writeToChild(TO_CHILD, data)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <Process pid=1030 status=-1>, childFD = 3
data = b'\x00\x04_ask\x00\x012\x00\x08_command\x00\x08Shutdown\x00\x00'
    def writeToChild(self, childFD, data):
>       self.pipes[childFD].write(data)
E       KeyError: 3