Removed unneeded objects validation in Manager.clean_objects()

This commit is contained in:
Lee Miller 2024-09-16 13:10:53 +03:00
parent d106078dac
commit 201acb9195
Signed by: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -56,15 +56,11 @@ class Manager(threading.Thread):
@staticmethod
def clean_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():
logging.debug(
'Deleted expired object: %s',
base64.b16encode(vector).decode())
else:
logging.warning(
'Deleted invalid object: %s',
base64.b16encode(vector).decode())
with shared.objects_lock:
del shared.objects[vector]