Sitemap
Better Programming

Advice for programmers.

Follow publication

Member-only story

How to Use Sidekiq in Rails 6

4 min readJul 10, 2020

Updated February 2021 for Ruby on Rails 6.1 and Sidekiq 6.1.3 while also adding a step-by-step guide for deploying to Heroku.

How to use Sidekiq in Rails 6

In September 2019, Sidekiq released version 6.x. Sidekiq comes in three flavours: the open-source version, Sidekiq Pro, and Sidekiq Enterprise.

Sidekiq uses threads to handle many jobs at the same time in the same process and is integrated tightly with Rails, although Rails isn’t a requirement. If you are looking for something language-agnostic, you should check out Faktory, also created by Mike Perham (the creator of Sidekiq).

At Organisely, we use Sidekiq for any long-running where the user doesn’t require immediate feedback. We also use Sidekiq for jobs that are likely to fail due to network errors and we want to leverage the automated retry mechanism.

Organisely sends a daily batch of text messages (using Twilio’s SMS API) as reminders for customers’ appointments. Although Twilio has insanely reliable APIs, network errors are inevitable and must be taken into account. We wrap each Twilio API call into a Sidekiq job that’ll retry if the API call is unsuccessful.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Catalin Ionescu
Catalin Ionescu

Written by Catalin Ionescu

Director of Applications Engineering. Bristol University alumnus.

Responses (4)

Write a response