Resque to Solid Queue Migration
We have moved several Rails projects from Resque
to Solid Queue, Rails’ own
database-backed Active Job backend. That includes carrying over recurring
(cron-style) jobs that used to run through resque-scheduler.
Why move to Solid Queue?
- No separate Redis instance to run, patch, and pay for just for background jobs
- Jobs, retries, and schedules live in the same database as the rest of your data - one less moving part to operate and back up
- It is what new Rails applications ship with by default, so it will keep getting maintained and improved
- Built-in support for recurring jobs, replacing
resque-scheduler’s cron-style YAML configuration
What the migration involves
- Converting Resque job classes to Active Job jobs
- Moving scheduled/cron jobs from
resque-scheduler’s YAML config to Solid Queue’sconfig/recurring.yml - Replacing the Resque worker process with the Solid Queue supervisor in deployment and process management
- Verifying enqueue and execution behavior through Continuous Integration before it ships via Continuous Delivery
From experience
We wrote up the full migration, including moving cron/recurring jobs, here:
Summary
Resque still works, but it ties you to Redis and a separate scheduler gem for anything cron-like. We move the jobs, the recurring schedule, and the worker process management over to Solid Queue without losing a job in transit.
Still running Resque? Get in touch.