l.s.t.p.ProcessWithTimeout(ProcessProtocol, TimeoutMixin) : class documentation

Part of lp.services.twistedsupport.processmonitor View In Hierarchy

Run a process and capture its output while applying a timeout.
Method __init__ Undocumented
Method callLater Override TimeoutMixin.callLater so we use self._clock.
Method spawnProcess Start a process.
Method connectionMade Start the timeout counter when connection is made.
Method timeoutConnection When a timeout occurs, kill the process with a SIGKILL.
Method processEnded Undocumented
def __init__(self, deferred, timeout, clock=None):
Undocumented
def callLater(self, period, func):
Override TimeoutMixin.callLater so we use self._clock.

This allows us to write unit tests that don't depend on actual wall clock time.

def spawnProcess(self, *args, **kwargs):
Start a process.

See reactor.spawnProcess.

def connectionMade(self):
Start the timeout counter when connection is made.
def timeoutConnection(self):
When a timeout occurs, kill the process with a SIGKILL.
def processEnded(self, reason):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.