Removed unneeded objects validation in Manager.clean_objects()
All checks were successful
Testing / default (push) Successful in 8m1s
All checks were successful
Testing / default (push) Successful in 8m1s
This commit is contained in:
parent
9bb3038547
commit
70f059d9b1
|
@ -63,15 +63,11 @@ class Manager(threading.Thread):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def clean_objects():
|
def clean_objects():
|
||||||
for vector in set(shared.objects):
|
for vector in set(shared.objects):
|
||||||
if not shared.objects[vector].is_valid():
|
# FIXME: no need to check is_valid() here
|
||||||
if shared.objects[vector].is_expired():
|
if shared.objects[vector].is_expired():
|
||||||
logging.debug(
|
logging.debug(
|
||||||
'Deleted expired object: %s',
|
'Deleted expired object: %s',
|
||||||
base64.b16encode(vector).decode())
|
base64.b16encode(vector).decode())
|
||||||
else:
|
|
||||||
logging.warning(
|
|
||||||
'Deleted invalid object: %s',
|
|
||||||
base64.b16encode(vector).decode())
|
|
||||||
with shared.objects_lock:
|
with shared.objects_lock:
|
||||||
del shared.objects[vector]
|
del shared.objects[vector]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user