mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-09 12:30:49 +02:00
quick nit for no-longer living files (#3702)
This commit is contained in:
parent
da43abe644
commit
2761a837c6
@ -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,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user