rails-jobs
Installation
SKILL.md
Rails Jobs
Use for background job design and review. Patterns from Campfire (Resque, 4 thin jobs) and Fizzy (Solid Queue, multi-queue).
Defaults
- Keep jobs shallow; the job body is one line calling a model method:
def perform(card) = card.notify_recipients. - Make jobs idempotent and safe to retry (e.g. rescue
RecordNotUniquein the domain op). - Fail loudly on real errors; avoid silent rescue patterns.
- Set
ActiveJob::Base.enqueue_after_transaction_commit = truein app defaults — fixes job-before-data races at the root. - Prefer Solid Queue (database-backed) over Redis-backed queues for new apps; co-locate with Puma (
SOLID_QUEUE_IN_PUMA) in small deployments.
Naming Convention
_laterenqueues, plain name does the work,_nowwhen you need an explicit synchronous twin: