c0253c98f9
Scheduler now runs a token-protected HTTP server on scheduler.http_port (default 8081, -1 disables) that exposes Prometheus /metrics and the daily-task JSON snapshot endpoint. Workers gain a blocking Run(ctx) and are supervised by a WaitGroup: on SIGINT/SIGTERM the metrics server shuts down first, worker ticks stop scheduling but ongoing runOnce calls keep their own context and finish, and the process waits up to 60s before exiting. Adds scheduler.http_host/http_port/internal_metrics_token to config with SCHEDULER_* env overrides and exposes port 8081 in the Docker image. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
137 lines
2.7 KiB
YAML
137 lines
2.7 KiB
YAML
server:
|
|
port: 8080
|
|
mode: release
|
|
|
|
database:
|
|
host: postgres
|
|
port: 5432
|
|
user: geo
|
|
password: geo_dev
|
|
dbname: geo
|
|
sslmode: disable
|
|
max_open_conns: 25
|
|
max_idle_conns: 5
|
|
|
|
monitoring_database:
|
|
host: monitoring-postgres
|
|
port: 5432
|
|
user: geo
|
|
password: geo_dev
|
|
dbname: geo_monitoring
|
|
sslmode: disable
|
|
max_open_conns: 25
|
|
max_idle_conns: 5
|
|
|
|
rabbitmq:
|
|
url: amqp://geo:geo_dev@rabbitmq:5672/geo
|
|
consumer_prefetch: 10
|
|
publish_channel_pool_size: 32
|
|
|
|
scheduler:
|
|
http_host: 127.0.0.1
|
|
http_port: 8081
|
|
internal_metrics_token: ""
|
|
dispatch_interval: 15s
|
|
dispatch_timeout: 30s
|
|
dispatch_batch_size: 100
|
|
dispatch_concurrency: 4
|
|
generation_queue_backpressure_limit: 1000
|
|
|
|
monitoring_workers:
|
|
result_ingest_concurrency: 4
|
|
projection_rebuild_concurrency: 2
|
|
|
|
membership:
|
|
default_plan_code: free
|
|
plans:
|
|
- code: free
|
|
name: Free
|
|
article_generation: 3
|
|
article_quota_cycle: lifetime
|
|
image_storage_bytes: 10485760
|
|
company_limit: 1
|
|
subscription_duration: 72h
|
|
contact_admin_on_expiry: true
|
|
- code: plus
|
|
name: Plus
|
|
article_generation: 200
|
|
article_quota_cycle: monthly
|
|
image_storage_bytes: 524288000
|
|
company_limit: 1
|
|
subscription_duration: 720h
|
|
- code: pro
|
|
name: Pro
|
|
article_generation: 400
|
|
article_quota_cycle: monthly
|
|
image_storage_bytes: 1073741824
|
|
company_limit: 2
|
|
subscription_duration: 720h
|
|
|
|
redis:
|
|
addr: redis:6379
|
|
db: 0
|
|
|
|
qdrant:
|
|
url: qdrant:6334
|
|
api_key: ""
|
|
collection: geo_knowledge_chunks
|
|
timeout: 15s
|
|
|
|
object_storage:
|
|
provider: minio
|
|
endpoint: minio:9000
|
|
access_key: minioadmin
|
|
secret_key: minioadmin
|
|
bucket: geo-private
|
|
use_ssl: false
|
|
public_base_url: ""
|
|
region: ""
|
|
|
|
cache:
|
|
driver: redis
|
|
|
|
jwt:
|
|
# Override via JWT_SECRET env var in .env
|
|
secret: "change-me-in-production"
|
|
access_ttl: 15m
|
|
refresh_ttl: 168h
|
|
|
|
log:
|
|
level: info,warn,error
|
|
format: json
|
|
|
|
llm:
|
|
provider: ark
|
|
base_url: https://ark.cn-beijing.volces.com/api/v3
|
|
# api_key is injected via LLM_API_KEY env var
|
|
api_key: ""
|
|
model: doubao-seed-2-0-lite-260215
|
|
knowledge_url_model: doubao-seed-2-0-mini-260215
|
|
timeout: 2m
|
|
max_output_tokens: 16000
|
|
temperature: 0.7
|
|
reasoning_effort: minimal
|
|
web_search_limit: 3
|
|
|
|
retrieval:
|
|
provider: siliconflow
|
|
base_url: https://api.siliconflow.cn/v1
|
|
# api_key is injected via SILICONFLOW_API_KEY env var
|
|
api_key: ""
|
|
embedding_model: BAAI/bge-m3
|
|
reranker_model: BAAI/bge-reranker-v2-m3
|
|
timeout: 30s
|
|
chunk_size: 900
|
|
chunk_overlap: 120
|
|
embedding_batch_size: 16
|
|
recall_limit: 12
|
|
rerank_top_n: 6
|
|
max_chunks_per_doc: 6
|
|
overlap_tokens: 60
|
|
|
|
generation:
|
|
queue_size: 128
|
|
worker_concurrency: 8
|
|
stream_enabled: false
|
|
article_timeout: 8m
|