QueueKeeperCheck.Checks (queue_keeper_check v0.4.1)

Copy Markdown View Source

The individual checks. Each takes (repo, config, now, query_opts) and returns a list of QueueKeeperCheck.Finding structs. QueueKeeperCheck.run/2 wraps each call in QueueKeeperCheck.Guard; call these directly only if you apply your own limits.

Every query is a plain SELECT. Checks read only id, state, queue, worker, attempt and timestamp columns from oban_jobs. args, meta, errors, tags and attempted_by are never selected or filtered on. When the opt-in ledger is present, :dead_workers SELECTs from queue_keeper_worker_sightings and queue_keeper_ledger_meta instead of scanning oban_jobs. The opt-in :persisted_jobs and :dead_worker_candidates checks also SELECT nonterminal oban_jobs rows (state-prefixed). Each query is either an aggregate (one row per queue or worker) or capped with LIMIT, and each is shaped to use Oban's standard indexes (state, queue, priority, scheduled_at, id; state, discarded_at; state, cancelled_at; the primary key). See docs/SECURITY_REVIEW.md for the exact SQL and measured plans.

Summary

Functions

backlog(repo, cfg, now, qopts)

cancelled(repo, cfg, now, qopts)

cron_missing(repo, cfg, now, qopts)

dead_worker_candidates(repo, cfg, now, qopts)

dead_workers(repo, cfg, now, qopts)

discarded(repo, cfg, now, qopts)

hanging(repo, cfg, now, qopts)

orphaned(repo, cfg, now, qopts)

persisted_jobs(repo, cfg, now, qopts)

retry_storm(repo, cfg, now, qopts)

stalled(repo, cfg, now, qopts)