Larkspur Docs

Configuration

Larkspur reads larkspur.toml from the working directory. Every key can be overridden with an environment variable prefixed by LARKSPUR_.

[store]

KeyDefaultDescription
driversqlitesqlite or postgres.
dsnfile:larkspur.dbConnection string for the selected driver.
max_open_conns10Maximum open connections in the pool.
retention168hHow long completed jobs are kept before pruning.

[worker]

KeyDefaultDescription
concurrency4Number of jobs processed in parallel per process.
poll_interval1sDelay between polls when the queue is empty.
visibility_timeout5mLease duration before a job is considered abandoned.
shutdown_grace30sTime allowed for in-flight jobs on SIGTERM.

[retry]

KeyDefaultDescription
max_attempts10Attempts before a job moves to the dead-letter state.
base_delay2sInitial backoff delay.
max_delay1hUpper bound for exponential backoff.
jitter0.2Random jitter factor applied to each delay.

[http]

KeyDefaultDescription
listen127.0.0.1:7420Address for the monitoring API and dashboard.
auth_tokenemptyBearer token required for write endpoints.
metricstrueExpose Prometheus metrics at /metrics.

Environment overrides

LARKSPUR_STORE_DRIVER=postgres
LARKSPUR_STORE_DSN=postgres://larkspur@db:5432/jobs?sslmode=require
LARKSPUR_WORKER_CONCURRENCY=32