feat: 历史归档按名称默认只保留最近7天

This commit is contained in:
2026-11-09 15:03:28 +08:00
parent f849950c5a
commit 3cd1196010
9 changed files with 219 additions and 1 deletions
+8
View File
@@ -5,6 +5,7 @@ import ftplib
import io
import json
import os
import shutil
import sys
import tempfile
import time
@@ -665,6 +666,13 @@ class LocalFileStorage:
(self._path(directory) / filename).write_bytes(payload)
return f"{directory}/{filename}"
def delete(self, path: str) -> None:
target = self._path(path)
if target.is_dir():
shutil.rmtree(target)
elif target.exists():
target.unlink()
class WorkerTest(unittest.TestCase):
def test_worker_processes_with_configured_storage_and_store(self) -> None: