mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 02:41:06 -05:00
Convert Eager Logging to Lazy Logging
This commit is contained in:
@@ -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)}")
|
||||
|
||||
Reference in New Issue
Block a user