l.r.s.d.ArchiveMirrorProberCallbacks(LoggingMixin) : class documentation

Part of lp.registry.scripts.distributionmirror_prober View In Hierarchy

No class docstring
Method __init__ Undocumented
Method deleteMirrorSeries Delete the mirror for self.series, self.pocket and self.component.
Method ensureMirrorSeries Make sure we have a mirror for self.series, self.pocket and
Method updateMirrorFreshness Update the freshness of this MirrorDistro{ArchSeries,SeriesSource}.
Method setMirrorFreshness Update the freshness of the given arch or source mirror.
Method logError Undocumented
Method _getSeriesPocketAndComponentDescription Return a string containing the name of the series, pocket and

Inherited from LoggingMixin:

Method logMessage Append a UTC timestamp to the message returned by the mirror
Method _getTime Return the current UTC time.
def __init__(self, mirror, series, pocket, component, url, log_file):
Undocumented
def deleteMirrorSeries(self, failure):
Delete the mirror for self.series, self.pocket and self.component.

If the failure we get from twisted is not a timeout, a bad response code or a connection skipped, then this failure is propagated.

def ensureMirrorSeries(self, http_status):
Make sure we have a mirror for self.series, self.pocket and self.component.
def updateMirrorFreshness(self, arch_or_source_mirror):
Update the freshness of this MirrorDistro{ArchSeries,SeriesSource}.

This is done by issuing HTTP HEAD requests on that mirror looking for some packages found in our publishing records. Then, knowing what packages the mirror contains and when these packages were published, we can have an idea of when that mirror was last updated.

def setMirrorFreshness(self, http_status, arch_or_source_mirror, freshness, url):
Update the freshness of the given arch or source mirror.

The freshness is changed only if the given freshness refers to a more recent date than the current one.

def _getSeriesPocketAndComponentDescription(self):
Return a string containing the name of the series, pocket and component.

This is meant to be used in the logs, to help us identify if this is a MirrorDistroSeriesSource or a MirrorDistroArchSeries.

def logError(self, failure, url):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.