Spaces:
Paused
Paused
Commit ·
e92a108
1
Parent(s): 90d59ab
Fix: still startup status
Browse files
server.py
CHANGED
|
@@ -18,6 +18,7 @@ app = FastAPI()
|
|
| 18 |
executor = ThreadPoolExecutor(max_workers=MAX_WORKERS)
|
| 19 |
tasks = {}
|
| 20 |
tasks_lock = threading.Lock()
|
|
|
|
| 21 |
|
| 22 |
|
| 23 |
def require_api_key(x_api_key: str | None):
|
|
@@ -65,6 +66,11 @@ def health():
|
|
| 65 |
}
|
| 66 |
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
@app.post("/task/create_account")
|
| 69 |
def create_account(x_api_key: str | None = Header(default=None)):
|
| 70 |
require_api_key(x_api_key)
|
|
|
|
| 18 |
executor = ThreadPoolExecutor(max_workers=MAX_WORKERS)
|
| 19 |
tasks = {}
|
| 20 |
tasks_lock = threading.Lock()
|
| 21 |
+
print(f"[INFO] server startup: max_workers={MAX_WORKERS}")
|
| 22 |
|
| 23 |
|
| 24 |
def require_api_key(x_api_key: str | None):
|
|
|
|
| 66 |
}
|
| 67 |
|
| 68 |
|
| 69 |
+
@app.get("/")
|
| 70 |
+
def root():
|
| 71 |
+
return {"status": "ok"}
|
| 72 |
+
|
| 73 |
+
|
| 74 |
@app.post("/task/create_account")
|
| 75 |
def create_account(x_api_key: str | None = Header(default=None)):
|
| 76 |
require_api_key(x_api_key)
|