Fixes for content checksum and torrent pieces backfill

Remove null handler from app.py, was silencing other logs
This commit is contained in:
Jake Moshenko 2016-02-11 16:53:18 -05:00
parent 2a350460d5
commit 88d84aa182
3 changed files with 6 additions and 7 deletions

View file

@ -132,13 +132,15 @@ def yield_random_entries(batch_query, primary_key_field, batch_size, max_id):
try:
while True:
start_index = allocator.get_block_start_index(batch_size)
end_index = min(start_index + batch_size, max_id + 1)
all_candidates = list(batch_query()
.where(primary_key_field >= start_index,
primary_key_field <= start_index + batch_size))
primary_key_field < end_index)
.order_by(primary_key_field))
if len(all_candidates) == 0:
logger.info('No candidates, new highest id: %s', start_index)
allocator.mark_completed(start_index, max_id + 1)
logger.info('No candidates, marking entire block completed %s-%s', start_index, end_index)
allocator.mark_completed(start_index, end_index)
continue
logger.info('Found %s candidates, processing block', len(all_candidates))