fix: 自动清理过期的chunk

This commit is contained in:
Lan
2025-12-01 15:24:47 +08:00
parent 3ff4e9b6cf
commit a649f54c5b
3 changed files with 12 additions and 14 deletions
-1
View File
@@ -50,7 +50,6 @@ async def clean_incomplete_uploads():
file_storage: FileStorageInterface = storages[settings.file_storage]()
# 默认 24 小时未完成的上传视为过期
expire_hours = getattr(settings, 'chunk_expire_hours', 24)
while True:
try:
expire_time = datetime.datetime.now() - datetime.timedelta(hours=expire_hours)