Skip to content

Commit 55b0b42

Browse files
committed
fix
1 parent 2a815cf commit 55b0b42

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gpt_server/model_worker/base/model_worker_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
worker = None
2626
app = FastAPI()
27+
os.makedirs(STATIC_DIR, exist_ok=True)
2728
app.mount("/static", StaticFiles(directory=STATIC_DIR), name="static")
2829

2930

@@ -47,11 +48,12 @@ def get_context_length_(config):
4748

4849
async def cleanup_static_files():
4950
"""清理静态文件目录并重建"""
51+
await asyncio.sleep(10) # 60分钟 = 3600秒
5052
logger.info(f"{datetime.now()} 开始清理静态文件目录:{STATIC_DIR}")
5153
shutil.rmtree(STATIC_DIR, ignore_errors=True)
5254
os.makedirs(STATIC_DIR, exist_ok=True)
5355
logger.info(f"{datetime.now()} 清理完成")
54-
await asyncio.sleep(1) # 60分钟 = 3600秒
56+
await asyncio.sleep(10) # 60分钟 = 3600秒
5557

5658

5759
async def run_scheduler():

0 commit comments

Comments
 (0)