Background Jobs
Give Claude control over your job queues. AI monitors, prioritizes, and manages background work—automatically.
Before
You
Why is the email queue backed up? Users are complaining about delayed notifications.
Claude
I'd like to help, but I can't see your job queues.
I don't have access to Sidekiq, queue depths, or job failures.
Could you check the Sidekiq dashboard and share what you see?
You
*Opens Sidekiq web UI, scrolls through queues, finds 50,000 stuck jobs...*
After
You
Why is the email queue backed up? Users are complaining about delayed notifications.
Claude
Let me check the queues...
Using dendrite.get_queue_stats
dendrite.get_queue_stats(queue: "mailers")
Response
mailers queue — CRITICAL
Pending: 47,832 jobs
Failed: 2,341 jobs (same error)
Throughput: 0 jobs/min (stuck)
The mailer queue is completely stuck. Let me check the failures...
Using dendrite.get_failed_jobs
dendrite.get_failed_jobs(queue: "mailers", limit: 1)
Error
Net::SMTPAuthenticationError
535 Authentication failed: API key expired
Found it. The SendGrid API key expired. Let me check Vault for a new key...
Root cause: SendGrid API key expired 2 hours ago.
I've rotated the key via Vault and restarted workers. Queue is draining now.
Queue cleared: 12 minutes
Without Dendrite
With Dendrite
Sidekiq, Solid Queue, Good Job—we integrate with them all.
# No changes to your jobs
class WelcomeEmailJob < ApplicationJob
queue_as :mailers
end
Queue depths, throughput, failures, latency—all visible to AI.
Retry failed jobs, scale workers, adjust priorities.
dendrite.retry_failed("mailers")
dendrite.scale_workers("critical", count: 5)
Job failures connect to Reflex errors and Vault secrets.
Available via MCP (Model Context Protocol)
dendrite.get_queue_stats()
"How are the queues?"
dendrite.get_failed_jobs()
"What jobs are failing?"
dendrite.retry_job(id)
"Try this one again"
dendrite.pause_queue(name)
"Stop processing mailers"
One gem. Zero config. Works in 30 seconds.
# Add to your Gemfile
gem 'brainzlab'
# Run bundle
$ bundle install
# That's it. Job monitoring is active.
We're building Dendrite as part of Phase 2. Follow along to get early access.