l.c.p.s.PullerMonitorProtocol(ProcessMonitorProtocolWithTimeout, NetstringReceiver) : class documentation

Part of lp.codehosting.puller.scheduler View In Hierarchy

The protocol for receiving events from the puller worker.
Method __init__ Construct an instance of the protocol, for listening to a worker.
Method reportMirrorFinished Undocumented
Method checkReportingFinishedAndNoStderr Check that the worker process behaved properly on clean exit.
Method ensureReportingFinished Clean up after the worker process exits uncleanly.
Method makeConnection Called when the process has been created.
Method outReceived Undocumented
Method errReceived Undocumented
Method do_startMirroring Undocumented
Method do_branchChanged Undocumented
Method do_mirrorFailed Undocumented
Method do_progressMade Any progress resets the timout counter.
Method do_log Undocumented

Inherited from ProcessMonitorProtocolWithTimeout:

Method callLater Override TimeoutMixin.callLater so we use self._clock.
Method connectionMade Start the timeout counter when connection is made.
Method timeoutConnection When a timeout occurs, kill the process and record a TimeoutError.
Method processEnded See ProcessMonitorProtocol.processEnded.

Inherited from ProcessMonitorProtocol (via ProcessMonitorProtocolWithTimeout):

Method runNotification Run a given function in series with other notifications.
Method unexpectedError Something's gone wrong: kill the subprocess and report failure.

Inherited from ProcessProtocolWithTwoStageKill (via ProcessMonitorProtocolWithTimeout, ProcessMonitorProtocol):

Method terminateProcess Terminate the process by SIGINT initially, but SIGKILL if needed.
Method _sigkill Forcefully kill the process.
def __init__(self, deferred, listener, clock=None):
Construct an instance of the protocol, for listening to a worker.
ParametersdeferredA Deferred that will be fired when the worker has finished (either successfully or unsuccesfully).
listenerA PullerMaster object that is notified when the protocol receives events from the worker.
clockA provider of Twisted's IReactorTime. This parameter exists to allow testing that does not depend on an external clock. If a clock is not passed in explicitly the reactor is used.
def reportMirrorFinished(self, ignored):
Undocumented
def checkReportingFinishedAndNoStderr(self, result):
Check that the worker process behaved properly on clean exit.

When the process exits cleanly, we expect it to have not printed anything to stderr and to have reported success or failure. If it has failed to do either of these things, we should fail noisily.

def ensureReportingFinished(self, reason):
Clean up after the worker process exits uncleanly.

If the worker process exited uncleanly, it probably didn't report success or failure, so we should report failure. If there was output on stderr, it's probably a traceback, so we use the last line of that as a failure reason.

def makeConnection(self, process):
Called when the process has been created.
def outReceived(self, data):
Undocumented
def errReceived(self, data):
Undocumented
def do_startMirroring(self):
Undocumented
def do_branchChanged(self, stacked_on_url, revid_before, revid_after, control_string, branch_string, repository_string):
Undocumented
def do_mirrorFailed(self, reason, oops):
Undocumented
def do_progressMade(self):
Any progress resets the timout counter.
def do_log(self, message):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.