Spaces:
Running
Running
th commited on
Commit ·
48de17a
1
Parent(s): 89b14f9
app.py
CHANGED
|
@@ -425,13 +425,14 @@ def health_check():
|
|
| 425 |
}
|
| 426 |
|
| 427 |
|
| 428 |
-
@app.
|
|
|
|
| 429 |
def warmup():
|
| 430 |
"""
|
| 431 |
预热端点 - 保持服务处于活跃状态
|
| 432 |
|
| 433 |
Warmup endpoint for UptimeRobot - keeps the service active
|
| 434 |
-
支持GET和
|
| 435 |
"""
|
| 436 |
return {
|
| 437 |
"status": "warm",
|
|
|
|
| 425 |
}
|
| 426 |
|
| 427 |
|
| 428 |
+
@app.get("/warmup")
|
| 429 |
+
@app.head("/warmup")
|
| 430 |
def warmup():
|
| 431 |
"""
|
| 432 |
预热端点 - 保持服务处于活跃状态
|
| 433 |
|
| 434 |
Warmup endpoint for UptimeRobot - keeps the service active
|
| 435 |
+
支持GET和HEAD两种方法(和其他正常运行的API保持一致)
|
| 436 |
"""
|
| 437 |
return {
|
| 438 |
"status": "warm",
|