Build a Resumable CSV Import with ActiveJob::Continuable | Code With Rails

13-Feb-2026 391
Long-running background jobs have an uncomfortable relationship with deploys. You kick off a 100,000-row CSV import, deploy new code five minutes later, and the worker restarts. The job either starts over from the beginning or silently dies. Most teams solve this with custom bookkeeping: a last_processed_id column, a Redis key, or an external gem like job-iteration. Rails 8.1 ships a built-in solution called ActiveJob::Continuable. It lets you split a job into steps, track progress with cursors, and automatically resume from where the job left off after an interruption. No gems, no custom state machines.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle