Configuration
Larkspur reads larkspur.toml from the working directory. Every key can be overridden with an environment variable prefixed by LARKSPUR_.
[store]
| Key | Default | Description |
driver | sqlite | sqlite or postgres. |
dsn | file:larkspur.db | Connection string for the selected driver. |
max_open_conns | 10 | Maximum open connections in the pool. |
retention | 168h | How long completed jobs are kept before pruning. |
[worker]
| Key | Default | Description |
concurrency | 4 | Number of jobs processed in parallel per process. |
poll_interval | 1s | Delay between polls when the queue is empty. |
visibility_timeout | 5m | Lease duration before a job is considered abandoned. |
shutdown_grace | 30s | Time allowed for in-flight jobs on SIGTERM. |
[retry]
| Key | Default | Description |
max_attempts | 10 | Attempts before a job moves to the dead-letter state. |
base_delay | 2s | Initial backoff delay. |
max_delay | 1h | Upper bound for exponential backoff. |
jitter | 0.2 | Random jitter factor applied to each delay. |
[http]
| Key | Default | Description |
listen | 127.0.0.1:7420 | Address for the monitoring API and dashboard. |
auth_token | empty | Bearer token required for write endpoints. |
metrics | true | Expose Prometheus metrics at /metrics. |
Environment overrides
LARKSPUR_STORE_DRIVER=postgres
LARKSPUR_STORE_DSN=postgres://larkspur@db:5432/jobs?sslmode=require
LARKSPUR_WORKER_CONCURRENCY=32