<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Greg on Medium]]></title>
        <description><![CDATA[Stories by Greg on Medium]]></description>
        <link>https://medium.com/@gregszero?source=rss-a7bbe9927277------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jXOFZWDIecNjZouHKeFpOA.png</url>
            <title>Stories by Greg on Medium</title>
            <link>https://medium.com/@gregszero?source=rss-a7bbe9927277------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 04:03:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gregszero/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to use Solid Queue in Rails]]></title>
            <link>https://gregszero.medium.com/how-to-use-solid-queue-in-rails-d092d723e091?source=rss-a7bbe9927277------2</link>
            <guid isPermaLink="false">https://medium.com/p/d092d723e091</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[developer-tools]]></category>
            <dc:creator><![CDATA[Greg]]></dc:creator>
            <pubDate>Sat, 30 Dec 2023 04:35:51 GMT</pubDate>
            <atom:updated>2023-12-30T04:35:51.775Z</atom:updated>
            <content:encoded><![CDATA[<h4>Enhance your Rails application’s queuing capabilities effortlessly with Solid Queue, without the need for Redis — this gem seamlessly runs on your app’s database.</h4><p>Using <a href="https://github.com/basecamp/solid_queue">Solid Queue</a> in Rails is easy and efficient. This DB-based queuing backend for Active Job prioritizes simplicity and performance. With features like delayed jobs, concurrency controls, pausing queues, numeric priorities, and bulk enqueuing, Solid Queue proves to be a versatile choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sDIYt2afIZVs5zzn" /><figcaption>Photo by <a href="https://unsplash.com/@lazycreekimages?utm_source=medium&amp;utm_medium=referral">Michael Dziedzic</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>To integrate Solid Queue into your Rails project, follow these simple steps:</p><p>Add the following line to your Gemfile:</p><ul><li>gem &quot;solid_queue&quot;</li></ul><p>Execute</p><ul><li>$ bundle</li></ul><p>Install the necessary migrations and configure the Active Job’s adapter with the provided generator:</p><ul><li>$ rails generate solid_queue:install</li></ul><p>This sets Solid Queue as the Active Job’s adapter in production and copies the required migrations to your application.</p><p>Alternatively, if you prefer, you can add only the migrations to your app:</p><ul><li>$ bin/rails solid_queue:install:migrations</li></ul><p>Manually set Solid Queue as your Active Job’s queue backend in your environment config:</p><pre># config/environments/production.rb <br># config/environments/development.rb<br> config.active_job.queue_adapter = :solid_queue</pre><p>Run the generated migrations:</p><ul><li>$ rails db:migrate</li></ul><p>Solid Queue automatically searches for your configuration in config/solid_queue.yml. Ensure you create this file in your project directory. While we won’t be editing this file in this post, it’s a necessary component for Solid Queue to function properly.</p><p>Now, you’re all set to enqueue jobs using Solid Queue. To start processing jobs in all queues with the default configuration, run:</p><pre>$ bundle exec rake solid_queue:start</pre><p>If opting not to run Solid Queue as a separate process — allowing the use of a single dyno on Heroku for both your server and jobs — you can achieve this by integrating the Puma plugin. Simply add the following line to your config/puma.rb file:</p><pre>plugin :solid_queue</pre><p>Solid Queue supports integration with SQL databases like MySQL, PostgreSQL, or SQLite. It optimizes performance by utilizing the FOR UPDATE SKIP LOCKED clause (when available) to prevent blocking and waiting on locks during job polling. The functionality of Solid Queue is complemented by Active Job, handling retries, discarding, error management, serialization, and delays. Additionally, it seamlessly aligns with Ruby on Rails multi-threading capabilities.</p><p>Exciting enhancements are on the horizon for Solid Queue, including upgrades to logging and instrumentation, a revamped CLI tool, and the option to operate within an existing process in “async” mode. Stay tuned for the introduction of unique job functionalities and the integration of recurring, cron-like tasks — coming your way shortly. For the latest updates on these advancements and more in the world of technology, follow me on Medium to stay in the loop!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d092d723e091" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>