Skip to content
CAI
Software that uses CAICheck a score

rails/solid_queue

54.2

Adequate · 6 November 2026

4.4k

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Puma plugin for Solid Queue integration

Introduces a new Puma plugin (\lib/puma/plugin/solid\_queue.rb\) that allows Solid Queue to run either as a forked child process or in async mode within the Puma server. The plugin supports both Puma 6 and Puma 7 hook names, handles process monitoring to stop Solid Queue on Puma restart or stop, and includes safeguards against deadlocks during shutdown by skipping Ruby's at-exit cleanup in forked processes.

lib/puma · high confidence

Add update generator for batch support migrations

An update generator has been added to copy new migration templates for batch support, including the creation of the solid\_queue\_batches and solid\_queue\_batch\_executions tables and the addition of batch\_id to solid\_queue\_jobs, allowing users to upgrade their existing Solid Queue setup to support job batching.

_lib/generators/solid\queue/update · high confidence

Initial release of SolidQueue as a standalone Active Job adapter

This change introduces SolidQueue as a new, standalone gem for job processing, replacing the previous \active\_job-database\_queue\ integration. The library provides a complete process-based architecture featuring a Supervisor, Dispatcher, Scheduler, and Worker, all managed via a Zeitwerk autoloader. It exposes a public API for configuring process lifecycles (start, stop, exit hooks), managing recurring tasks, and tuning operational parameters such as heartbeat intervals, shutdown timeouts, and concurrency control. The adapter defaults to preserving finished jobs and uses SKIP LOCKED for database locking, offering a robust, multi-process foundation for Active Job.

lib · high confidence

Introduce SolidQueue adapter for Active Job

Adds the SolidQueue adapter, allowing users to configure Active Job to use SolidQueue as the backend by setting \queue\_adapter\ to \:solid\_queue\. This adapter implements standard enqueueing methods (\enqueue\, \enqueue\_at\, \enqueue\_all\) that delegate to \SolidQueue::Job\, and enforces \enqueue\_after\_transaction\_commit\ as a permanent \true\ setting. It also provides a \stopping?\ method that checks a global worker shutdown flag, accepting an optional job argument for compatibility with newer Rails versions.

_lib/active\_job/queue\adapters · high confidence

Introduce batch tracking and concurrency controls for Active Job

Active Job now supports job batching and concurrency limiting. A new \BatchId\ module allows jobs to track their membership in a batch, enabling batch-level callbacks and status tracking. Additionally, a \ConcurrencyControls\ module introduces the \limits\_concurrency\ DSL, allowing developers to define concurrency keys, limits, groups, and conflict behaviors (block or discard) to manage how jobs execute concurrently. The previous \database\_queue\ engine structure has been removed as part of this refactoring.

_lib/active\job · high confidence

New install generator for Solid Queue setup

The Solid Queue gem now provides an \install\ generator (\bin/rails generate solid\_queue:install\) that automates the initial configuration. Running this command copies over default configuration files (\config/queue.yml\, \config/recurring.yml\), installs a database schema (\db/queue\_schema.rb\), and adds a \bin/jobs\ binstub to start the supervisor. It also automatically configures the application to use Solid Queue as the Active Job adapter in the production environment and sets up the necessary database connection settings.

_lib/generators/solid\queue/install · high confidence

Solid Queue 1.7.0 introduces async supervisor mode and fiber workers

Solid Queue now supports running workers and dispatchers in the same process as the supervisor via a new 'async' mode, in addition to the existing 'fork' mode. This is enabled by the new AsyncSupervisor class, which manages supervised processes as threads rather than child processes, and the FiberPool, which allows workers to execute jobs using Ruby fibers (requiring the 'async' gem and fiber-scoped isolation). The update also introduces lifecycle hooks (start, stop, exit) for processes, a new AppExecutor to wrap code in Rails' application executor, and a CLI check command to validate configuration before starting.

_lib/solid\queue · high confidence

Solid Queue batch lifecycle and callback support

Solid Queue now supports job batching, allowing users to group jobs and track their collective progress, status (pending, enqueued, completed, failed), and completion percentages. The system includes automatic cleanup of finished batches, handling of stalled or crashed batches via a sweep mechanism, and the ability to define callbacks that trigger specific jobs upon batch success, failure, or completion.

_app/models/solid\_queue/batch, app/models/solid\_queue/failed\execution · high confidence

Solid Queue introduces batch processing, concurrency control, and queue pausing

Solid Queue now supports grouping jobs into batches via the new \Batch\ and \BatchExecution\ models, allowing users to track completion and failure counts for groups of jobs. It adds concurrency control using \Semaphore\ and \BlockedExecution\ models to limit parallel job execution based on keys and durations. Additionally, users can pause and resume individual queues using the \Pause\ model and \Queue\ wrapper, and the system now tracks process lifecycles with heartbeats via the \Process\ model.

_app/models/solid\queue · high confidence

SolidQueue jobs now support batching, concurrency controls, and granular lifecycle states

The SolidQueue job model has been refactored to support advanced queueing features. Jobs can now be grouped into batches for coordinated execution and progress tracking via the new Batchable concern. Concurrency limits are enforced using semaphores, allowing jobs to be blocked or discarded based on class-level configuration. The model also introduces explicit states for scheduled, ready, claimed, and failed executions, enabling better handling of retries, discards, and recurring tasks. Additionally, finished jobs can be automatically cleared after a configurable time period.

_app/models/solid\queue/job · high confidence

Support for dynamic recurring tasks in the scheduler

The scheduler now supports dynamically scheduled recurring tasks, allowing jobs to be added or removed at runtime rather than only via static configuration. This capability is opt-in and controlled by the \dynamic\_tasks\_enabled\ option; when enabled, the scheduler loads dynamic tasks from the database, schedules new ones, and unschedules removed ones during each cycle. The implementation ensures thread safety and prevents stale state by wrapping database reads and task scheduling in an app executor and clearing changes appropriately within the scheduler loop.

_lib/solid\queue/scheduler · high confidence

Behavioural changes

Optimized distinct value queries on PostgreSQL using recursive CTEs

The SolidQueue \DistinctValues\ module now uses a recursive Common Table Expression (CTE) to emulate a loose index scan on PostgreSQL, replacing the standard \DISTINCT\ query for large tables. This change improves performance by avoiding full index scans when retrieving distinct values for a leading index column, while still respecting current scopes and bind parameters.

_app/models/solid\queue/record · high confidence

Refactor process lifecycle into concerns and handle claimed executions on prune

The Solid Queue process management logic has been restructured by extracting pruning and execution handling into dedicated concerns (Prunable and Executor). This change ensures that when a process is pruned due to inactivity, any jobs it has claimed but not yet completed are explicitly failed with a ProcessPrunedError, rather than being left in a limbo state. Additionally, the Executor concern ensures that claimed executions are released when a process is destroyed, improving cleanup reliability for workers and supervisors.

_app/models/solid\queue/process · high confidence

Refactored execution attribute handling and added job dispatching logic

The Solid Queue execution model now explicitly manages how it inherits attributes from its associated job, allowing configurable attribute assumption (such as queue name and priority) via a new \JobAttributes\ concern. Additionally, a new \Dispatching\ concern was introduced to handle the lifecycle of scheduled jobs, specifically providing a \dispatch\_jobs\ method that dispatches a batch of jobs and subsequently deletes their corresponding execution records.

_app/models/solid\queue/execution · high confidence

Refactored process lifecycle and execution model

The internal process architecture has been restructured to support a unified base class and distinct execution modes (inline, async, and fork). This change introduces a new \Processes::Base\ class and modular concerns like \Runnable\ and \Supervised\, enabling processes to run in separate threads or OS forks with proper boot guards and signal handling. Users benefit from more robust process management, including better handling of graceful shutdowns, automatic replacement of failed forked workers, and clearer instrumentation of process lifecycle events.

_lib/solid\queue/processes · high confidence

Refactored supervisor lifecycle into modular concerns

The Solid Queue supervisor's internal structure has been reorganized into distinct modules to improve maintainability and clarity. A new \Maintenance\ module handles background tasks such as pruning dead processes and failing orphaned executions when a worker exits abnormally. Process identity is now managed by a dedicated \Pidfile\ class, integrated via the \Pidfiled\ concern to prevent duplicate supervisor instances. Signal handling has been extracted into a \Signals\ module, which manages graceful and immediate termination for standalone processes. These changes refactor existing behavior into separate files without altering the external API or operational logic of the supervisor.

_lib/solid\queue/supervisor · high confidence

Renamed engine from active\_job-database\_queue to solid\_queue

The application's engine has been renamed from active\_job-database\_queue to solid\_queue. This change updates the engine path in bin/rails to point to the new lib/solid\_queue/engine directory, reflecting the rebranding of the underlying technology. Additionally, the bin/setup script now uses docker compose to start services and runs rails db:reset to ensure a clean database state before bundling dependencies.

bin · high confidence

Solid Queue installer now uses a single schema file with batch support

The Solid Queue installation template has been replaced with a single \queue\_schema.rb\ file (version 1, targeting ActiveRecord 7.1) instead of individual migration files. This new schema introduces support for job batches by adding \solid\_queue\_batches\ and \solid\_queue\_batch\_executions\ tables, and includes a fix for the \job\_id\ foreign key column types in execution tables to ensure data integrity.

_lib/generators/solid\queue/install/templates/db · high confidence

Support for simple command-based recurring tasks

Users can now schedule recurring jobs by providing a raw command string instead of a full job class. The new SolidQueue::RecurringJob executes the provided command string directly, enabling simpler task definitions for basic operations.

app/jobs · high confidence

Test coverage

Added integration tests for Puma plugin with Solid Queue; Added integration tests for Solid Queue process lifecycles and features; Added test coverage for SolidQueue models; Added test fixtures and configuration for Solid Queue dummy app; Added test helper jobs for Active Job features; Added test helpers for SolidQueue configuration, job execution, and process management; Added test support models for job execution and sharding; Added unit tests for Solid Queue core components and execution modes; Refactored test infrastructure and renamed test suite; Removed empty test placeholder file; Removed empty test/mailers placeholder; Test suite configuration updates for SolidQueue and SQLite; Updated dummy app environment configurations for Solid Queue testing; Updated test dummy database schemas for multi-shard and batch support.

Dependencies

Project infrastructure and tooling updates

The project now enforces Ruby 3.3 as the target version and adds RuboCop configuration via the rubocop-rails-omakase gem for standardized code style. Development and testing workflows are enhanced with Appraisals to support testing against Rails 7.1 through 8.1 (including main), a new Rakefile task to run tests across MySQL, PostgreSQL, and SQLite databases, and a docker-compose setup for local database services. Additionally, the repository's .gitignore has been expanded to exclude JetBrains IDE and VS Code settings, and the license file was updated to reflect 37signals ownership.

(repo-wide) · high confidence

Rename gem to solid\_queue and upgrade Rails dependency to 7.1+

The gem has been renamed from active\_job-database\_queue to solid\_queue, and its runtime dependencies now require Rails 7.1 or higher (activerecord, activejob, railties). The project also drops support for Ruby 3.1, raising the minimum requirement to Ruby 3.2, and adds specific dependencies for cron scheduling (fugit), concurrency (concurrent-ruby), and CLI tools (thor).

(dependencies) · high confidence

Updated test matrix to include Rails 7.1, 7.2, 8.0, 8.1, and main

The gemfile test matrix has been updated to add support for testing against Rails versions 7.1, 7.2, 8.0, and 8.1, as well as the Rails main branch. This change expands the compatibility testing scope for the library, ensuring it functions correctly across these newer and upcoming Rails releases.

gemfiles · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 54 → 54 (-0.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 75 → 75 (+0.0)
  • Architecture 96 → 96 (+0.0)
  • Maturity 55 → 54 (-1.0)
  • Readiness 36 → 36 (+0.0)
  • Security 83 → 86 (+3.2)
  • Domain Modelling 100 → 100 (+0.0)

Resolved (2)

  • Inconsistent method naming and signature for bulk discard operations. ClaimedExecution and Execution both have discard_all_in_batches and discard_all_from_jobs, but the signatures differ slightly (ClaimedExecution.discard_all_in_batches takes no args implying it operates on the current context, while Execution.discard_all_in_batches(batch_size) takes an explicit batch size). This inconsistency in argument requirements for semantically identical operations across related types is confusing.
  • Redundant/Confusing naming for recurring task registration. SolidQueue.schedule_recurring_task is a high-level convenience method that likely delegates to or is conceptually identical to RecurringTask.create_dynamic_task. Having two distinct entry points for the same logical operation (registering a recurring job) creates confusion about which API to use.

New (1)

  • Medium: security finding (details withheld)

Changes since last survey

  • 29 commits — 28 feature/other, 1 fixes

By area

  • app/models — 15 commits
  • (root) — 7 commits
  • lib/solid_queue — 3 commits
  • test/models — 2 commits
  • lib/solid_queue.rb — 1 commit
  • test/integration — 1 commit

Notable commits

  • fix: Fix rescheduling recreated dynamic tasks
  • change: Acquire concurrency locks by key when dispatching several jobs
  • change: Bump solid_queue to 1.7.1
  • change: Bump solid_queue to 1.7.2
  • change: Correct which characters grow when the failed execution error is escaped
  • change: Create executions from the job record instead of its id
  • change: Don't eager load the CLI
  • change: Escape LIKE metacharacters in queue prefixes
  • change: Escape queue prefixes with a character no database treats specially
  • change: Explain how async mode handles TERM and QUIT with jobs in flight
  • change: Explain how to remove recurring tasks left behind by an empty configuration
  • change: Fit failed execution errors into size-limited error columns
  • change: Give concurrency slots back only to the semaphore they came from
  • change: Ignore schema lookups when checking that enqueuing doesn't reload the job
  • change: Keep batch completion errors from blocking subsequent jobs
  • change: Let the job answer for the concurrency slot it holds
  • change: Move the concurrent dispatching test next to the other semaphore lock tests
  • change: Pin json below 3 for Rails 7.1 and 8.0
  • change: Place the semaphore note under 1.7.2 in UPGRADING
  • change: Quote the LIKE escape so MySQL accepts queue prefixes
  • …and 9 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

rails/solid_queue was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit b9c646a8486ef3e76f70919568cac070276da0e1 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.