Fixes incorrect cleanup count
This commit is contained in:
parent
582e952020
commit
a2eeae9661
1 changed files with 3 additions and 1 deletions
|
|
@ -340,6 +340,9 @@ def _perform_lock_cleanup(
|
||||||
cleaned_count = 0
|
cleaned_count = 0
|
||||||
new_earliest_time = None
|
new_earliest_time = None
|
||||||
|
|
||||||
|
# Calculate total count before cleanup
|
||||||
|
total_cleanup_len = len(cleanup_data)
|
||||||
|
|
||||||
# Perform cleanup operation
|
# Perform cleanup operation
|
||||||
for cleanup_key, cleanup_time in list(cleanup_data.items()):
|
for cleanup_key, cleanup_time in list(cleanup_data.items()):
|
||||||
if current_time - cleanup_time > CLEANUP_KEYED_LOCKS_AFTER_SECONDS:
|
if current_time - cleanup_time > CLEANUP_KEYED_LOCKS_AFTER_SECONDS:
|
||||||
|
|
@ -369,7 +372,6 @@ def _perform_lock_cleanup(
|
||||||
else float("inf"),
|
else float("inf"),
|
||||||
MIN_CLEANUP_INTERVAL_SECONDS,
|
MIN_CLEANUP_INTERVAL_SECONDS,
|
||||||
)
|
)
|
||||||
total_cleanup_len = len(cleanup_data)
|
|
||||||
|
|
||||||
if lock_type == "async":
|
if lock_type == "async":
|
||||||
direct_log(
|
direct_log(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue