fixed housekeeping being broken

This commit is contained in:
Kevin Froman 2020-03-03 05:55:50 -06:00
parent c0def6fb7e
commit 665cb0c732
12 changed files with 62 additions and 29 deletions

View file

@ -44,11 +44,14 @@ def clean_old_blocks(comm_inst):
logger.info('Deleted block: %s' % (bHash,))
while comm_inst.storage_counter.is_full():
oldest = blockmetadb.get_block_list()[0]
try:
oldest = blockmetadb.get_block_list()[0]
except IndexError:
break
blacklist.addToDB(oldest)
removeblock.remove_block(oldest)
onionrstorage.deleteBlock(oldest)
__remove_from_upload.remove(comm_inst, oldest)
__remove_from_upload(comm_inst, oldest)
logger.info('Deleted block: %s' % (oldest,))
comm_inst.decrementThreadCount('clean_old_blocks')