relister: Fix consistently the behavior for the first time relisting

If nothing has been done prior to a full relisting, there is actually nothing
to list. So the relister in question does nothing.

In that context, the IndexingLister class's `db_partition_indices` method now
returns an empty list instead of raising a ValueError when there is nothing to
list.

Related T1826
Related e129e48
This commit is contained in:
Antoine R. Dumont (@ardumont) 2019-06-21 19:42:17 +02:00
parent 6662ae8db5
commit b99617f976
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8
6 changed files with 44 additions and 39 deletions

View file

@ -38,6 +38,11 @@ def range_gitlab_lister(start, end, **lister_args):
@app.task(name=__name__ + '.FullGitLabRelister', bind=True)
def full_gitlab_relister(self, **lister_args):
"""Full lister
This should be renamed as such.
"""
lister = new_lister(**lister_args)
_, total_pages, _ = lister.get_pages_information()
ranges = list(utils.split_range(total_pages, NBPAGES))