mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-04 12:58:42 +02:00
quick nit for no-longer living files (#3702)
This commit is contained in:
@@ -35,7 +35,7 @@ class LongTermLogger:
|
|||||||
def _cleanup_old_files(self, category_path: Path) -> None:
|
def _cleanup_old_files(self, category_path: Path) -> None:
|
||||||
try:
|
try:
|
||||||
files = sorted(
|
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
|
key=lambda x: x.stat().st_mtime, # Sort by modification time
|
||||||
reverse=True,
|
reverse=True,
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user