Creating a Baseline Sidekiq Configuration
As you’ll learn, operating an app that uses Sidekiq requires vigilance and adjustment. Your workloads are unique to your app, which means your Sidekiq configuration will be equally unique. But it’s important to see a baseline configuration that you can build on. Sidekiq has great defaults, but setting up an explicit and flexible configuration will be helpful later when you need to make changes.
First, install the Sidekiq gem by adding this line to your Gemfile. Note that call to gem is preceded by a comment explaining what Sidekiq does. “Sidekiq” is a cool name, but for anyone on your team that hasn’t heard of it, a few words in the Gemfile can go a long way.
| # This ... |
Get Ruby on Rails Background Jobs with Sidekiq now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.