# Reproq configuration (YAML)
# Precedence: defaults < config file < env vars < CLI flags.

# Empty uses the selected Django queue database through manage.py reproq.
# Set an explicit DSN when invoking the Go binary directly.
dsn: ""

worker:
  # Optional DSN override for the worker.
  dsn: ""
  worker_id: "worker-1"
  queues:
    - default
    - high
  allowed_task_modules:
    - "myapp.tasks."
    - "tasks."
  # Use ["*"] to disable task module validation (dev only).
  concurrency: 10
  poll_min_backoff: "100ms"
  poll_max_backoff: "5s"
  lease_seconds: 300
  heartbeat_seconds: 60
  reclaim_interval_seconds: 60
  # Omit python_bin to use the interpreter running manage.py reproq.
  # Direct Go invocation defaults to python3; set an explicit executable to override.
  executor_module: "reproq_django.executor"
  payload_mode: "stdin" # stdin|file|inline
  max_payload_bytes: 1048576
  max_stdout_bytes: 1048576
  max_stderr_bytes: 1048576
  logs_dir: "" # Empty disables persisted logs.
  exec_timeout: "1h"
  shutdown_timeout: "30s"
  priority_aging_factor: 60

beat:
  # Optional DSN override for beat.
  dsn: ""
  interval: "30s"

metrics:
  # Set either addr or port. addr overrides port.
  addr: "127.0.0.1:9090"
  port: 0
  auth_token: ""
  allow_cidrs:
    - "127.0.0.1/32"
  # Optional TLS settings (requires tls_cert + tls_key).
  tls_cert: ""
  tls_key: ""
  tls_client_ca: "" # Optional mTLS client CA bundle.
  auth_limit: 30
  auth_window: "1m"
  auth_max_entries: 1000
