l.s.m.m.x.XMLRPCRunner(Runner) : class documentation

Part of lp.services.mailman.monkeypatches.xmlrpcrunner View In Hierarchy

A Mailman 'queue runner' for talking to the Launchpad XMLRPC service.
Method __init__ Create a faux runner which checks into Launchpad occasionally.
Method _oneloop Check to see if there's anything for Mailman to do.
Method _heartbeat Add a heartbeat to the log for a monitor to watch.
Method _log Log the exception in a log file and as an OOPS.
Method _check_list_actions See if there are any list actions to perform.
Method _update_list_subscriptions Update the subscription information for a single mailing list.
Method _get_subscriptions Get the latest subscription information.
Method _create_or_reactivate Process mailing list creation and reactivation actions.
Method _apply_list_defaults Apply mailing list defaults and tie the new list into the MTA.
Method _reactivate Reactivate an archived mailing list from backup file.
Method _create Create a new mailing list.
Method _modify Process mailing list modification actions.
Method _deactivate Process mailing list deactivation actions.
Method _check_held_messages See if any held messages have been accepted or rejected.
Method _resynchronize Process resynchronization actions.
def __init__(self, slice=None, numslices=None):
Create a faux runner which checks into Launchpad occasionally.

Every XMLRPC_SLEEPTIME number of seconds, this runner wakes up and connects to a Launchpad XMLRPC service to see if there's anything for it to do. slice and numslices are ignored, but required by the Mailman queue runner framework.

def _oneloop(self):
Check to see if there's anything for Mailman to do.

Mailman makes an XMLRPC connection to Launchpad to see if there are any mailing lists to create, modify or deactivate. It also requests updates to list subscriptions. This method is called periodically by the base class's main loop.

This method always returns 0 to indicate to the base class's main loop that it should sleep for a while after calling this method.

def _heartbeat(self):
Add a heartbeat to the log for a monitor to watch.
def _log(self, exc):
Log the exception in a log file and as an OOPS.
def _check_list_actions(self):
See if there are any list actions to perform.
def _update_list_subscriptions(self, list_name, subscription_info):
Update the subscription information for a single mailing list.
Parameterslist_nameThe name of the mailing list to update. (type: string)
subscription_infoThe mailing list's new subscription information. (type: a list of 4-tuples containing the address, real name, flags, and status of each person in the list's subscribers.)
def _get_subscriptions(self):
Get the latest subscription information.
def _create_or_reactivate(self, actions, statuses):
Process mailing list creation and reactivation actions.

actions is a sequence of (team_name, initializer) tuples where the team_name is the name of the mailing list to create and initializer is a dictionary of initial custom values to set on the new mailing list.

statuses is a dictionary mapping team names to one of the strings 'success' or 'failure'.

def _apply_list_defaults(self, team_name, list_defaults):
Apply mailing list defaults and tie the new list into the MTA.
def _reactivate(self, team_name, tgz_file):
Reactivate an archived mailing list from backup file.
def _create(self, team_name):
Create a new mailing list.
def _modify(self, actions, statuses):
Process mailing list modification actions.

actions is a sequence of (team_name, modifications) tuples where the team_name is the name of the mailing list to create and modifications is a dictionary of values to set on the mailing list.

statuses is a dictionary mapping team names to one of the strings 'success' or 'failure'.

def _deactivate(self, actions, statuses):
Process mailing list deactivation actions.

actions is a sequence of team names for the mailing lists to deactivate.

statuses is a dictionary mapping team names to one of the strings 'success' or 'failure'.

def _check_held_messages(self):
See if any held messages have been accepted or rejected.
def _resynchronize(self, actions, statuses):
Process resynchronization actions.

actions is a sequence of 2-tuples specifying what needs to be resynchronized. The tuple is of the form (listname, current-status).

statuses is a dictionary mapping team names to one of the strings 'success' or 'failure'.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.