treewide: update to new multi worker dowork api
The work.Queue() implementation has changed and now allows scheduling
tasks from multiple goroutines in parallel. Also, it requires a new
argument for limiting the queue buffer size in order to apply back
pressure.
Define new configuration variables to allow tuning the queue sizes and
number of workers per service:
[mail]
# Maximum size of the outgoing email queue (default 512).
egress-queue-size = 512
[$service_name]
# Number of parallel workers per queue (default 1).
# There are multiple queues (for egress email, webhooks, etc.).
# This setting is applied on a per-queue basis.
queue-workers = 1
[webhooks]
# Maximum size of the webhooks queue (default 512).
queue-size = 512
Use these new settings to configure the queues and workers accordingly.
Fix unit tests as well.
Link: https://git.sr.ht/~sircmpwn/dowork/commit/95719cfc0118
Signed-off-by: Robin Jarry <robin@jarry.cc>
Upgrade Go, `go mod tidy`, build on Alpine 3.20
email: update StartTLS usage per go-smtp changes
Drop gqlparser v1 dependency
Only use v2 throughout the repository.
Migrate to chi v5
v1 is not maintained anymore.
Add prometheus SQL connection stats
Also updates the prometheus client_go library
Update pq (Postgres driver) to latest version
Replace x/crypto package by ProtonMail/go-crypto to support ed25519 OpenPGP keys
Add support for mail setups that don't support TLS or Auth
auth: force webhooks to read-only
auth: fix /query/api-meta.json route
This route does not need authentication.
Add legacy webhooks worker implementation
Expand context for work queues