perf: improve worker and storage throughput
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
237899745
2026-07-26 00:57:29 +08:00
parent da9b273253
commit de5f451cd1
14 changed files with 611 additions and 101 deletions

View File

@@ -9,12 +9,15 @@ RUST_LOG=info,tower_http=info,imageforge=debug
# 数据库
DATABASE_URL=postgres://imageforge:devpassword@localhost:5432/imageforge
DATABASE_MAX_CONNECTIONS=10
DATABASE_MAX_CONNECTIONS=16
# Redis
REDIS_URL=redis://localhost:6379
# Worker 并发(每个批量任务内同时处理的文件数)
# Worker 同时处理的批量任务数
WORKER_TASK_CONCURRENCY=4
# 每个批量任务内同时处理的文件数
WORKER_CONCURRENCY=4
# 单进程图片处理并发上限API 与 Worker 均生效,默认等于 CPU 线程数)