quick nit for no-longer living files (#3702)

This commit is contained in:
pablonyx
2025-01-18 11:09:34 -08:00
committed by GitHub
parent da43abe644
commit 2761a837c6

View File

@@ -35,7 +35,7 @@ class LongTermLogger:
def _cleanup_old_files(self, category_path: Path) -> None:
try:
files = sorted(
category_path.glob("*.json"),
[f for f in category_path.glob("*.json") if f.is_file()],
key=lambda x: x.stat().st_mtime, # Sort by modification time
reverse=True,
)