Removed unneeded objects validation in Manager.clean_objects()
All checks were successful
Testing / default (push) Successful in 8m1s

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

View File

@ -63,15 +63,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]