Have tag backfill worker continue processing ranges that have errors

This commit is contained in:
Joseph Schorr 2019-02-05 18:03:58 -05:00
parent 39097b2318
commit f8dd8b2494

View file

@ -156,7 +156,7 @@ class TagBackfillWorker(Worker):
for candidate, abt, _ in iterator: for candidate, abt, _ in iterator:
if not backfill_tag(candidate): if not backfill_tag(candidate):
logger.info('Another worker pre-empted us for label: %s', candidate.id) logger.info('Another worker pre-empted us for tag: %s', candidate.id)
abt.set() abt.set()
@ -171,14 +171,14 @@ def lookup_map_row(repositorytag):
def backfill_tag(repositorytag): def backfill_tag(repositorytag):
logger.info('Backfilling tag %s', repositorytag.id) logger.info('Backfilling tag %s', repositorytag.id)
# Ensure that a mapping row doesn't already exist. If it does, we've been preempted. # Ensure that a mapping row doesn't already exist. If it does, nothing more to do.
if lookup_map_row(repositorytag): if lookup_map_row(repositorytag):
return False return False
# Grab the manifest for the RepositoryTag, backfilling as necessary. # Grab the manifest for the RepositoryTag, backfilling as necessary.
manifest_id = _get_manifest_id(repositorytag) manifest_id = _get_manifest_id(repositorytag)
if manifest_id is None: if manifest_id is None:
return False return True
lifetime_start_ms = (repositorytag.lifetime_start_ts * 1000 lifetime_start_ms = (repositorytag.lifetime_start_ts * 1000
if repositorytag.lifetime_start_ts is not None else None) if repositorytag.lifetime_start_ts is not None else None)