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()
|
metrics_manager.update_cleanup_time()
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Cleanup completed ({mode.value}):\n" +
|
"%s%s%s", f"Cleanup completed ({mode.value}):\n", "\n".join(
|
||||||
"\n".join(
|
|
||||||
f"- {phase.value}: {count} items"
|
f"- {phase.value}: {count} items"
|
||||||
for phase, count in items_cleaned.items()
|
for phase, count in items_cleaned.items()
|
||||||
if count > 0
|
if count > 0
|
||||||
) +
|
), f"\nTotal duration: {duration:.2f}s")
|
||||||
f"\nTotal duration: {duration:.2f}s"
|
|
||||||
)
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error during cleanup: {str(e)}")
|
logger.error(f"Error during cleanup: {str(e)}")
|
||||||
|
|||||||
Reference in New Issue
Block a user