Removed unneeded objects validation in Manager.clean_objects()
This commit is contained in:
parent
d106078dac
commit
201acb9195
|
@ -56,15 +56,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