swh.lister.launchpad.lister module

class swh.lister.launchpad.lister.LaunchpadLister(override_config=None)[source]

Bases: swh.lister.core.lister_base.ListerBase

MODEL

alias of swh.lister.launchpad.models.LaunchpadModel

LISTER_NAME = 'launchpad'
instance = 'launchpad'
flush_packet_db = 20
launchpad: launchpadlib.launchpad.Launchpad
get_model_from_repo(repo: lazr.restfulclient.resource.Entry) → Dict[str, Union[str, datetime.datetime]][source]
lib_response_simplified(response: lazr.restfulclient.resource.Collection) → List[Dict[str, Union[str, datetime.datetime]]][source]
get_git_repos(threshold: Optional[datetime.datetime]) → lazr.restfulclient.resource.Collection[source]
db_last_threshold() → Optional[datetime.datetime][source]
ingest_data_lp(identifier: Optional[datetime.datetime], checks: bool = False) → Tuple[lazr.restfulclient.resource.Collection, dict][source]
The core data fetch sequence. Request launchpadlib endpoint. Simplify and

filter response list of repositories. Inject repo information into local db. Queue loader tasks for linked repositories.

Parameters
  • identifier – Resource identifier.

  • checks – Additional checks required

run(max_bound: Optional[datetime.datetime] = None) → Dict[str, Any][source]
Main entry function. Sequentially fetches repository data

from the service according to the basic outline in the class docstring, continually fetching sublists until either there is no next index reference given or the given next index is greater than the desired max_bound.

Parameters

max_bound – optional date to start at

Returns

Dict containing listing status