Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/phabricator/lister.py
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | def _bootstrap_repositories_listing(self): | ||||
after that value | after that value | ||||
Returns: | Returns: | ||||
int: The first repository index | int: The first repository index | ||||
""" | """ | ||||
params = '&order=oldest&limit=1' | params = '&order=oldest&limit=1' | ||||
response = self.safely_issue_request(params) | response = self.safely_issue_request(params) | ||||
models_list = self.transport_response_simplified(response) | models_list = self.transport_response_simplified(response) | ||||
self.max_index = models_list[0]['indexable'] | |||||
models_list = self.filter_before_inject(models_list) | models_list = self.filter_before_inject(models_list) | ||||
injected = self.inject_repo_data_into_db(models_list) | injected = self.inject_repo_data_into_db(models_list) | ||||
self.schedule_missing_tasks(models_list, injected) | self.schedule_missing_tasks(models_list, injected) | ||||
return self.max_index | return models_list[0]['indexable'] | ||||
def get_repo_url(attachments): | def get_repo_url(attachments): | ||||
""" | """ | ||||
Return url for a hosted repository from its uris attachments according | Return url for a hosted repository from its uris attachments according | ||||
to the following priority lists: | to the following priority lists: | ||||
* protocol: https > http | * protocol: https > http | ||||
* identifier: shortname > callsign > id | * identifier: shortname > callsign > id | ||||
Show All 19 Lines |