Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

mininq is configured via a TOML config file, CLI flags, and environment variables.

Precedence: CLI flags > environment variables > config file > defaults

Config File

By default, mininq looks for mininq.toml in the current directory. Specify a different path with --config:

mininq --config /etc/mininq/config.toml

Full Example

[server]
host = "0.0.0.0"
port = 6390
db_path = "mininq.db"

[worker]
concurrency = 10
poll_interval_ms = 500
queues = []                  # empty = all queues
reaper_interval_secs = 30
scheduler_interval_secs = 15
retention_days = 30          # omit to keep jobs forever
cleanup_interval_secs = 3600

[defaults]
max_retries = 3
retry_backoff = "exponential"  # "exponential" | "linear" | "fixed"
base_delay_ms = 1000
max_delay_ms = 300000          # 5 minutes
timeout_ms = 30000             # 30 seconds

[logging]
level = "info"
format = "json"                # "json" | "pretty"

Reference

[server]

FieldTypeDefaultDescription
hostString"0.0.0.0"Bind address
portu166390HTTP port
db_pathString"mininq.db"Path to the SQLite database file

[worker]

FieldTypeDefaultDescription
concurrencyusize10Maximum concurrent job executions (semaphore permits)
poll_interval_msu64500Milliseconds between poll cycles
queues[String][]Queue names to process; empty means all queues
reaper_interval_secsu6430Seconds between reaper sweeps for stale jobs
scheduler_interval_secsu6415Seconds between scheduler ticks for cron jobs
retention_daysu32?noneDays to keep completed/dead jobs; omit to keep forever
cleanup_interval_secsu643600Seconds between cleanup sweeps (only active if retention is set)

[defaults]

These defaults apply to jobs that don’t specify their own values.

FieldTypeDefaultDescription
max_retriesi323Maximum retry attempts
retry_backoffString"exponential"Backoff strategy: exponential, linear, fixed
base_delay_msi321000Base delay for retry calculation (ms)
max_delay_msi32300000Maximum retry delay cap (ms)
timeout_msi3230000Webhook request timeout (ms)

[logging]

FieldTypeDefaultDescription
levelString"info"Log level: trace, debug, info, warn, error
formatString"json"Output format: json or pretty

CLI Flags

mininq [OPTIONS]

Options:
  -c, --config <PATH>       Path to config file [default: mininq.toml]
      --host <HOST>         Server host (overrides config)
      --port <PORT>         Server port (overrides config)
      --db-path <PATH>      Database path (overrides config)
      --log-level <LEVEL>   Log level (overrides config)
  -h, --help                Print help

Environment Variables

VariableOverrides
MININQ_HOSTserver.host
MININQ_PORTserver.port
MININQ_DB_PATHserver.db_path
MININQ_LOG_LEVELlogging.level