l.r.s.teamparticipation : module documentation

Part of lp.registry.scripts

Script code relating to team participations.
Function check_teamparticipation_circular Check circular references.
Function report_progress Iterate through results, reporting on progress.
Function execute_long_query Execute the given query, reporting as results are fetched.
Function fetch_team_participation_info Fetch people, teams, memberships and participations.
Function check_teamparticipation_consistency Check for missing or spurious participations.
Function fix_teamparticipation_consistency Fix missing or spurious participations.
def check_teamparticipation_circular(log):
Check circular references.

There can be no mutual participation between teams.

def report_progress(log, interval, results, what):
Iterate through results, reporting on progress.
ParameterslogA logger.
intervalHow many results to report progress about.
resultsAn iterable of things.
whatA string descriping what the results are.
def execute_long_query(store, log, interval, query):
Execute the given query, reporting as results are fetched.

The query is logged, then every interval rows a message is logged with the total number of rows fetched thus far.

def fetch_team_participation_info(log):
Fetch people, teams, memberships and participations.
def check_teamparticipation_consistency(log, info):
Check for missing or spurious participations.

For example, participations for people who are not members, or missing participations for people who are members.

def fix_teamparticipation_consistency(log, errors):
Fix missing or spurious participations.

This function does not consult TeamMembership at all, so it /may/ introduce another participation inconsistency if the records that are the subject of the given errors have been modified since being checked.

ParameterserrorsAn iterable of ConsistencyError tuples.
API Documentation for Launchpad, generated by pydoctor at 2018-02-19 00:00:03.