plugins/lisa-rails-agy/skills/ops-verify-jobs/SKILL.md
Verify Solid Queue background jobs are running in Rails applications. Check worker health, queue depth, failed jobs, recurring job execution, and retry stuck jobs.
npx skillsauth add codyswanngt/lisa ops-verify-jobsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Verify Solid Queue background jobs are running and healthy.
Argument: $ARGUMENTS — operation (status, failed, retry, recurring, depth; default: status)
config/solid_queue.yml (or config/queue.yml) to understand the worker and dispatcher configurationapp/jobs/ directory to discover all job classesconfig/recurring.yml (if it exists) to discover scheduled/recurring jobsThe Rails application must be running (locally or remotely) for database-backed queries to work.
Check Solid Queue process health via database heartbeats:
bin/rails runner "
processes = SolidQueue::Process.all
puts '=== Solid Queue Processes ==='
processes.each do |p|
stale = p.last_heartbeat_at < 5.minutes.ago ? 'STALE' : 'OK'
puts \"#{p.kind} | PID #{p.pid} | #{p.hostname} | Last heartbeat: #{p.last_heartbeat_at} | #{stale}\"
end
puts ''
puts \"Total: #{processes.count} processes\"
puts \"Healthy: #{processes.select { |p| p.last_heartbeat_at > 5.minutes.ago }.count}\"
puts \"Stale: #{processes.select { |p| p.last_heartbeat_at <= 5.minutes.ago }.count}\"
"
bin/rails runner "
puts '=== Queue Depth ==='
SolidQueue::Job.where(finished_at: nil).group(:queue_name).count.each do |queue, count|
puts \"#{queue}: #{count} pending\"
end
puts ''
total = SolidQueue::Job.where(finished_at: nil).count
puts \"Total pending: #{total}\"
"
bin/rails runner "
failed = SolidQueue::FailedExecution.includes(:job).order(created_at: :desc).limit(20)
puts '=== Failed Jobs ==='
failed.each do |f|
puts \"#{f.job.class_name} | Queue: #{f.job.queue_name} | Failed at: #{f.created_at} | Error: #{f.error.to_s.truncate(120)}\"
end
puts ''
puts \"Total failed: #{SolidQueue::FailedExecution.count}\"
"
Retry all failed jobs:
bin/rails runner "
count = SolidQueue::FailedExecution.count
SolidQueue::FailedExecution.find_each do |fe|
fe.retry
end
puts \"Retried #{count} failed jobs\"
"
Retry a specific job class:
bin/rails runner "
failed = SolidQueue::FailedExecution.includes(:job).where(solid_queue_jobs: { class_name: '{JobClassName}' })
count = failed.count
failed.find_each { |fe| fe.retry }
puts \"Retried #{count} #{'{JobClassName}'} jobs\"
"
bin/rails runner "
puts '=== Recurring Tasks ==='
SolidQueue::RecurringTask.all.each do |task|
last_run = SolidQueue::Job.where(class_name: task.class_name).order(created_at: :desc).first
last_run_at = last_run&.created_at || 'NEVER'
puts \"#{task.key} | #{task.class_name} | Schedule: #{task.schedule} | Last run: #{last_run_at}\"
end
" 2>/dev/null || echo "RecurringTask not available — check config/recurring.yml"
For checking jobs in staging/production environments:
kamal app exec --roles=web "bin/rails runner \"
processes = SolidQueue::Process.all
healthy = processes.select { |p| p.last_heartbeat_at > 5.minutes.ago }.count
stale = processes.select { |p| p.last_heartbeat_at <= 5.minutes.ago }.count
failed = SolidQueue::FailedExecution.count
pending = SolidQueue::Job.where(finished_at: nil).count
puts \\\"Processes: #{processes.count} (#{healthy} healthy, #{stale} stale)\\\"
puts \\\"Pending jobs: #{pending}\\\"
puts \\\"Failed jobs: #{failed}\\\"
\"" -d {environment}
| Kind | PID | Hostname | Last Heartbeat | Status | |------|-----|----------|---------------|--------| | Worker | 12345 | web-1 | 30s ago | OK | | Dispatcher | 12346 | web-1 | 15s ago | OK |
| Queue | Pending | Status | |-------|---------|--------| | default | 3 | OK | | mailers | 0 | OK | | low_priority | 150 | WARN (> 100) |
| Job Class | Queue | Failed At | Error (truncated) | |-----------|-------|-----------|-------------------| | SendEmailJob | mailers | 5m ago | Net::SMTPAuthenticationError | | ProcessPaymentJob | default | 1h ago | Stripe::CardError |
Flag concerns:
development
Prepare a machine — a fresh laptop or a throwaway container — to run coding agents, before any repository exists. Detects which of Lisa's supported agents (Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot) are already installed, asks which credential manager the machine uses (Bitwarden, 1Password, Doppler, Vault, AWS, or none), and installs only what is missing, each by its vendor's own preferred method. Idempotent, headless by default, and emits a Dockerfile for a spin-up/spin-down environment. Run it on a new machine, in a container, or before cloning anything.
tools
Provision and verify a remote execution environment for a host project — Codex Cloud today, other remote surfaces as they are added. Generates a repository-owned setup script that installs the declared toolchain, materializes secrets through lisa-secrets-access, and runs the project's own hook. Provisions by API where one exists, by driving the vendor console where one does not, and by emitting exact config otherwise — then proves the result with the same read-back regardless of which tier did the work. Use before dispatching any work with executionEnv.
tools
Bring a developer's machine in line with the toolchain the project declares. Reports every tool in remoteEnv.tools that is missing, outdated, or unpinned for this platform, and installs the missing ones into ~/.local/bin from the same pinned, checksummed entries the remote surfaces use — but only when asked. Same manifest, same pins, same installers as lisa-setup-remote-env; what differs is consent and that the pin is a floor rather than an equality. Run it on a fresh checkout, after a manifest change, or when a tool fails at the moment of use.
tools
Route one unit of work to a remote execution surface. Reads the executionEnv parameter (local by default, codex-cloud or claude-web today), verifies the environment is provisioned and bound to this repository, submits a thin skill invocation, records the task identifier to .lisa/remote-dispatch.json, and exits without polling. Routing only — the remote runs the identical skill from the identical repository. Composable and inline: other skills invoke it via the Skill tool rather than users calling it directly.