<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/a-guide-to-using-batches-in-solidqueue-4ksr1xqij" -->

---
title: A Guide to using Batches in SolidQueue | daily.dev
description: SolidQueue, the default job queue for Ruby on Rails, gained batch support in version 1.7, letting developers group jobs together and trigger callbacks...
canonical: https://daily.dev/posts/a-guide-to-using-batches-in-solidqueue-4ksr1xqij
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: A Guide to using Batches in SolidQueue | daily.dev
og:description: SolidQueue, the default job queue for Ruby on Rails, gained batch support in version 1.7, letting developers group jobs together and trigger callbacks...
og:url: https://daily.dev/posts/a-guide-to-using-batches-in-solidqueue-4ksr1xqij
og:image: https://api.daily.dev/og/posts/4Ksr1xQij.png
og:image:alt: A Guide to using Batches in SolidQueue
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# A Guide to using Batches in SolidQueue

**[Ruby Flow](https://daily.dev/sources/rubyflow)** · 15 min read · 0 upvotes · 0 comments

## Summary

SolidQueue, the default job queue for Ruby on Rails, gained batch support in version 1.7, letting developers group jobs together and trigger callbacks (on_finish, on_success, on_failure) once the group completes. The guide covers batch metadata, accessing batches from within jobs, adding jobs dynamically to running batches, compatibility with concurrency controls and transaction commits, and caution around querying job records directly in callbacks. Practical examples include parallel log-chunk processing, orchestrating RubyLLM sub-agents in parallel, and building a multi-level ETL pipeline using nested batches.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://jpcamara.com/2026/08/24/a-guide-to-using-batches.html>

## Questions this post answers

### How do I run a callback job after a group of jobs finishes in SolidQueue 1.7?

SolidQueue 1.7 introduces batches, created with SolidQueue::Batch.enqueue, which accept on_finish, on_success, and on_failure options naming ActiveJob classes to run once every job in the group completes, succeeds, or fails, including retries. You can also attach a description and metadata to the batch for use in callbacks or child jobs.

_Track new SolidQueue batch capabilities like this on daily.dev as Rails job orchestration evolves._

### Can I add more jobs to a SolidQueue batch after it has already started?

Yes, but only from within a job that is already part of that batch, by calling batch.enqueue inside the job's perform method. This is the only race-condition-safe way to extend a batch, since the batch cannot finish until the jobs running inside it finish. Attempting to enqueue into an already-finished batch raises an AlreadyFinished error.

_daily.dev helps Rails developers stay current on job-queue patterns like batch orchestration._

### Are SolidQueue batches mutable like GoodJob batches?

No, SolidQueue batches are not designed to be mutable in the way GoodJob batches are; GoodJob explicitly supports mutable, recursive multi-step batches. In SolidQueue, similar staged workflows are achieved by triggering new batches and reusing the same on_finish callback job with different metadata to represent each stage.

_Comparing job-queue features across GoodJob and SolidQueue gets easier when following updates on daily.dev._

## Similar posts on daily.dev

- [SolidQueue Batches: evolution and architecture](https://daily.dev/posts/solidqueue-batches-evolution-and-architecture-af4it5kwq) · Ruby Flow · 7 upvotes · 0 comments
- [Rails 8 Solid Queue: Database-Backed Background Jobs](https://daily.dev/posts/rails-8-solid-queue-database-backed-background-jobs-ggbxv8ocu) · Saeloun · 0 upvotes · 0 comments
- [GoodJob, Solid Queue, Sidekiq, Active Job, in 2026](https://daily.dev/posts/goodjob-solid-queue-sidekiq-active-job-in-2026-yvn44jn5s) · RUBYLAND · 0 upvotes · 0 comments
- [GitHub - nicolasva/solid-jobs](https://daily.dev/posts/github---nicolasva-solid-jobs-3psnafm9f) · Ruby Flow · 0 upvotes · 0 comments
- [I Love You, Redis, But I’m Leaving You for SolidQueue](https://daily.dev/posts/i-love-you-redis-but-i-m-leaving-you-for-solidqueue-yu2ffnoqr) · Simple Thread · 40 upvotes · 0 comments

---

Tags: [#ruby](https://daily.dev/tags/ruby), [#rails](https://daily.dev/tags/rails)

[View this post on daily.dev](https://daily.dev/posts/a-guide-to-using-batches-in-solidqueue-4ksr1xqij)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"A Guide to using Batches in SolidQueue","url":"https://daily.dev/posts/a-guide-to-using-batches-in-solidqueue-4ksr1xqij","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/a-guide-to-using-batches-in-solidqueue-4ksr1xqij"},"datePublished":"2026-08-24T18:52:50.702Z","dateModified":"2026-08-24T18:53:16.743Z","description":"SolidQueue, the default job queue for Ruby on Rails, gained batch support in version 1.7, letting developers group jobs together and trigger callbacks...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3e2ac6c9662e12a53f5f9f7112021cb1?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3e2ac6c9662e12a53f5f9f7112021cb1?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Ruby Flow","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Ruby Flow","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/a21aaa8bcbbf448193a016895c90a0e1","url":"https://daily.dev/sources/rubyflow"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/a-guide-to-using-batches-in-solidqueue-4ksr1xqij","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ruby,rails","timeRequired":"PT15M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Ruby Flow","item":"https://daily.dev/sources/rubyflow"},{"@type":"ListItem","position":3,"name":"A Guide to using Batches in SolidQueue"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/a-guide-to-using-batches-in-solidqueue-4ksr1xqij#faq","mainEntity":[{"@type":"Question","name":"How do I run a callback job after a group of jobs finishes in SolidQueue 1.7?","acceptedAnswer":{"@type":"Answer","text":"SolidQueue 1.7 introduces batches, created with SolidQueue::Batch.enqueue, which accept on_finish, on_success, and on_failure options naming ActiveJob classes to run once every job in the group completes, succeeds, or fails, including retries. You can also attach a description and metadata to the batch for use in callbacks or child jobs. Track new SolidQueue batch capabilities like this on daily.dev as Rails job orchestration evolves."}},{"@type":"Question","name":"Can I add more jobs to a SolidQueue batch after it has already started?","acceptedAnswer":{"@type":"Answer","text":"Yes, but only from within a job that is already part of that batch, by calling batch.enqueue inside the job's perform method. This is the only race-condition-safe way to extend a batch, since the batch cannot finish until the jobs running inside it finish. Attempting to enqueue into an already-finished batch raises an AlreadyFinished error. daily.dev helps Rails developers stay current on job-queue patterns like batch orchestration."}},{"@type":"Question","name":"Are SolidQueue batches mutable like GoodJob batches?","acceptedAnswer":{"@type":"Answer","text":"No, SolidQueue batches are not designed to be mutable in the way GoodJob batches are; GoodJob explicitly supports mutable, recursive multi-step batches. In SolidQueue, similar staged workflows are achieved by triggering new batches and reusing the same on_finish callback job with different metadata to represent each stage. Comparing job-queue features across GoodJob and SolidQueue gets easier when following updates on daily.dev."}}]}
```

