Spaces:
Sleeping
Sleeping
Update app.py
Browse files41 unmodified lines424344454546474889 unmodified lines13813914014114114214314435 unmodified lines18018118218318418518618718818919041 unmodified lines
async def cleanup_loop(): while True: await asyncio.sleep(3600) # 1時間ごとに実行 await asyncio.sleep(3600) now = time.time() to_delete = [ tid for tid, t in list(tasks.items())89 unmodified lines raise Exception("サーバーが停止しています。管理者にお問い合わせください。") raise Exception(f"Colab接続失敗: {error_msg}")
# 通常のメディア変換処理(遅延インポート) # 通常のメディア変換処理(遅延インポートで起動時メモリを節約) else: for i, fname in enumerate(filenames): in_f = os.path.join(input_path, fname)35 unmodified lines
# --- APIエンドポイント ---
@app.get("/favicon.ico")async def favicon(): # faviconがないと404になりヘルスチェックが失敗するため204を返す raise HTTPException(status_code=204)
@app.get("/")async def read_index(): with open("index.html", "r", encoding="utf-8") as f:app.py+7-2