We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a815cf commit 55b0b42Copy full SHA for 55b0b42
gpt_server/model_worker/base/model_worker_base.py
@@ -24,6 +24,7 @@
24
25
worker = None
26
app = FastAPI()
27
+os.makedirs(STATIC_DIR, exist_ok=True)
28
app.mount("/static", StaticFiles(directory=STATIC_DIR), name="static")
29
30
@@ -47,11 +48,12 @@ def get_context_length_(config):
47
48
49
async def cleanup_static_files():
50
"""清理静态文件目录并重建"""
51
+ await asyncio.sleep(10) # 60分钟 = 3600秒
52
logger.info(f"{datetime.now()} 开始清理静态文件目录:{STATIC_DIR}")
53
shutil.rmtree(STATIC_DIR, ignore_errors=True)
54
os.makedirs(STATIC_DIR, exist_ok=True)
55
logger.info(f"{datetime.now()} 清理完成")
- await asyncio.sleep(1) # 60分钟 = 3600秒
56
57
58
59
async def run_scheduler():
0 commit comments