From e632f3a7f0b51789bc945e1740f0168707294037 Mon Sep 17 00:00:00 2001 From: "pixeebot[bot]" <104101892+pixeebot[bot]@users.noreply.github.com> Date: Sat, 19 Apr 2025 03:06:42 +0000 Subject: [PATCH] Convert Eager Logging to Lazy Logging --- videoarchiver/queue/cleanup.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/videoarchiver/queue/cleanup.py b/videoarchiver/queue/cleanup.py index 912b3ab..12eb42c 100644 --- a/videoarchiver/queue/cleanup.py +++ b/videoarchiver/queue/cleanup.py @@ -341,14 +341,11 @@ class QueueCleaner: metrics_manager.update_cleanup_time() logger.info( - f"Cleanup completed ({mode.value}):\n" + - "\n".join( + "%s%s%s", f"Cleanup completed ({mode.value}):\n", "\n".join( f"- {phase.value}: {count} items" for phase, count in items_cleaned.items() if count > 0 - ) + - f"\nTotal duration: {duration:.2f}s" - ) + ), f"\nTotal duration: {duration:.2f}s") except Exception as e: logger.error(f"Error during cleanup: {str(e)}")