rails-background-jobs

Configure Rails background jobs with idempotency and retry strategies.

22|6|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/igmarin/rails-agent-skills --skill rails-background-jobs-igmarin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails-background-jobs
Source: https://github.com/igmarin/rails-agent-skills/tree/main/rails-background-jobs
Command: npx skills add https://github.com/igmarin/rails-agent-skills --skill rails-background-jobs-igmarin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use this skill when adding, configuring, or reviewing background jobs in Rails. Covers Active Job, Solid Queue (Rails 8 default), Sidekiq, recurring jobs, idempotency, retry strategies, discard_on, queue selection, and Mission Control Jobs. Applies to both Rails 7 and Rails 8 patterns.

Core Features & Use Cases

  • Standardized patterns for idempotent jobs with safe retries.
  • Guidance for Active Job compatibility across Rails 7/8 and backends (Solid Queue, Sidekiq).
  • Clear testing gates and integration points with Mission Control Jobs.

Quick Start

Configure a new background job in your Rails app and validate idempotency and retry behavior with a failing spec.

Frequently Asked Questions about rails-background-jobs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make Rails background jobs idempotent to prevent duplicate execution?

Idempotent Rails background jobs prevent duplicate execution by applying idempotency checks within Active Job classes, ensuring safe retries across Solid Queue or Sidekiq backends without unintended side effects.

What is the proper way to use retry_on and discard_on in Active Job?

Proper retry_on and discard_on usage in Active Job involves configuring standardized retry strategies for transient failures and discarding permanent errors, ensuring reliable background job processing across Rails 7 and 8.

Does this background job retry strategy work with both Solid Queue and Sidekiq?

Yes, the background job retry strategy works with both Solid Queue and Sidekiq, providing Active Job compatibility and queue selection guidance across Rails 7 and Rails 8 setups.

How do I test Rails background jobs with RSpec to validate idempotency and retries?

Test Rails background jobs with RSpec by implementing failing specs that validate idempotency checks and retry behavior, establishing clear testing gates for mission-control workflows.

Why do my Rails background jobs keep executing duplicates despite retry configurations?

Rails background jobs execute duplicates when idempotency checks are missing, making retry_on configurations insufficient; implementing idempotency gates prevents duplicate execution during retries.