Add processor heartbeat management and improve health check functionality
All checks were successful
Publish FaceAI Container / publish (push) Successful in 3m7s
All checks were successful
Publish FaceAI Container / publish (push) Successful in 3m7s
- Introduced processor heartbeat configuration in environment variables and Docker setup. - Implemented heartbeat publishing in the processor worker. - Enhanced health check endpoint to include processor availability status. - Updated frontend components to handle processor unavailability messages. - Added legacy return functionality in the upload panel.
This commit is contained in:
parent
c0732c142c
commit
87d9238795
14 changed files with 292 additions and 23 deletions
|
|
@ -28,6 +28,7 @@ services:
|
|||
FACEAI_RUNTIME_ROOT: /data/runtime
|
||||
FACEAI_UPLOAD_ROOT: /data/runtime/uploads
|
||||
FACEAI_LOG_ROOT: /data/logs
|
||||
FACEAI_PROCESSOR_HEARTBEAT_GRACE_MS: 20000
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./logs:/data/logs
|
||||
|
|
@ -37,7 +38,7 @@ services:
|
|||
ports:
|
||||
- "3001:3001"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:3001/health | grep -q '\"ok\":true'"]
|
||||
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3001/health').then(async (response) => { const payload = await response.json().catch(() => ({})); if (!response.ok || payload.ok !== true) { console.error(JSON.stringify(payload)); process.exit(1); } }).catch((error) => { console.error(error.stack || error.message); process.exit(1); })"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
|
|
@ -71,6 +72,8 @@ services:
|
|||
FACEAI_PKL_ROOT: /data/pkl
|
||||
FACEAI_WORKER_CONCURRENCY: 2
|
||||
FACEAI_MATCHER_BINARY: /app/bin/face_matcher
|
||||
FACEAI_PROCESSOR_HEARTBEAT_INTERVAL_MS: 5000
|
||||
FACEAI_PROCESSOR_HEARTBEAT_TTL_SECONDS: 20
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./logs:/data/logs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue