November 2023
Beginner to intermediate
80 pages
2h 1m
English
Other than keeping the code in your jobs to a minimum (as discussed in Create a New Sidekiq Job), the main issue with organizing Sidekiq job code is managing duplication. There are three ways to do so: using middleware, using generators, and using a common base class. Using a base class should be familiar to you, since that is how most code is shared in Rails codebase. One problem with our Sidekiq jobs is that ApplicationJob is using Active Job.
Active Job is a generalized interface for queuing jobs,[24] that can use any job library underneath, be it Sidekiq, Resque, or something else. This is useful when an external library or Rails’ internals need to queue a job. This is less useful when ...
Read now
Unlock full access