PlanetScale

How to kill Sidekiq jobs in Ruby on Rails

Aug 15, 2022Elom Gomez
How to kill Sidekiq jobs in Ruby on Rails
SummaryAI, from the source post

This post introduces a new Sidekiq client middleware that integrates with Flipper to disable specific Sidekiq jobs in production. The middleware checks if a feature flag named 'disable_<job_class_name>' is enabled. If it is, the job is prevented from being pushed to Redis. The post provides the middleware code, instructions on how to configure it in Rails applications, and an example of how to disable an 'InvoiceJob' by enabling the 'disable_invoice_job' flag.

More from the Sidekiq Job Control trail