add:前端判断文件大小

add:自定义删除过期文件间隔,修复因间隔过短导致还没下载文件就没了
This commit is contained in:
lan
2022-12-15 16:34:18 +08:00
parent 1f14997e4a
commit 5543811c20
6 changed files with 21 additions and 7 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ async def delete_expire_files():
query = delete(Codes).where(Codes.id.in_(exps_ids))
await s.execute(query)
await s.commit()
await asyncio.sleep(random.randint(2, 2))
await asyncio.sleep(settings.DELETE_EXPIRE_FILES_INTERVAL)
async def get_code(s: AsyncSession):