Update compute worker to use separate environment variable for PDF job attempts (`COMPUTE_PDF_JOB_ATTEMPTS`) and set Whisper job max deliveries to 1, clarifying and separating retry logic between job types. Adjust `.env.example` and deployment docs to comment out defaults and document new/renamed variables for advanced tuning. In TTS segment ensure route, introduce explicit timeouts for Whisper alignment operations, with configurable durations for local and worker modes, improving robustness and error handling for long-running alignments.
42 lines
1.4 KiB
Text
42 lines
1.4 KiB
Text
# Compute worker bind
|
|
# Platform note:
|
|
# - Local/manual: keep PORT=8081
|
|
# - Railway/Render/Fly/etc: platform injects PORT
|
|
# COMPUTE_WORKER_HOST=0.0.0.0
|
|
# PORT=8081
|
|
# COMPUTE_LOG_FORMAT=pretty
|
|
# COMPUTE_LOG_LEVEL=info
|
|
|
|
# App <-> worker auth
|
|
COMPUTE_WORKER_TOKEN=local-compute-token
|
|
|
|
# NATS/JetStream
|
|
NATS_URL=nats://nats:4222
|
|
# Optional: NATS authentication credentials (e.g. for Synadia Cloud / NGS)
|
|
# You can specify the file path:
|
|
# NATS_CREDS_FILE=/path/to/NGS-Default-compute-worker.creds
|
|
# Or specify the raw credentials string content (excellent for container/cloud platforms):
|
|
# NATS_CREDS="-----BEGIN NATS USER JWT-----\n...\n-----BEGIN USER NKEY SEED-----\n..."
|
|
|
|
# Shared object storage (must be reachable from worker)
|
|
S3_BUCKET=openreader-documents
|
|
S3_REGION=us-east-1
|
|
S3_ACCESS_KEY_ID=devkey
|
|
S3_SECRET_ACCESS_KEY=devsecret
|
|
# S3_PREFIX=openreader
|
|
# Optional for non-AWS S3-compatible endpoints:
|
|
S3_ENDPOINT=http://host.docker.internal:8333
|
|
S3_FORCE_PATH_STYLE=true
|
|
|
|
# Queue + execution tuning
|
|
# COMPUTE_PREWARM_MODELS=true
|
|
# COMPUTE_WHISPER_CONCURRENCY=1
|
|
# COMPUTE_PDF_CONCURRENCY=2
|
|
# COMPUTE_WHISPER_TIMEOUT_MS=30000
|
|
# COMPUTE_PDF_TIMEOUT_MS=90000
|
|
# COMPUTE_PDF_JOB_ATTEMPTS=2
|
|
# COMPUTE_JOBS_STREAM_MAX_BYTES=268435456
|
|
# COMPUTE_JOB_STATES_MAX_BYTES=67108864
|
|
# Optional stale window for reusing in-flight opKey entries before forcing a new attempt
|
|
# Default is max(30m, 4x max compute timeout); running jobs also refresh heartbeat every 5s
|
|
# COMPUTE_OP_STALE_MS=1800000
|