This is a pure technical debt requirement. All our background jobs are run through the sidekiq adaptor. But many of the jobs do not inherit from ActiveJob, but instead just call include Sidekiq::Job.
Sidekiq jobs have a lot more control and testing ease than active job counterparts, in general. So we should move them all to be consistent, and actually move to include Sidekiq::Job instead.
Requirements & acceptance criteria
Move all jobs to include Sidekiq::Job. Do this by changing ApplicationJob to simply include it and have all jobs inherit from ApplicationJob.
This would broadly require:
changing the call-sites to be perform_async rather than perform_later
fixing tests for the jobs
Additional notes
This will also allow us to add more details for sentry exceptions, because we can write Sidekiq middlewares to do that.
Context
This is a pure technical debt requirement. All our background jobs are run through the sidekiq adaptor. But many of the jobs do not inherit from
ActiveJob
, but instead just callinclude Sidekiq::Job
.Sidekiq jobs have a lot more control and testing ease than active job counterparts, in general. So we should move them all to be consistent, and actually move to
include Sidekiq::Job
instead.Requirements & acceptance criteria
Move all jobs to
include Sidekiq::Job
. Do this by changingApplicationJob
to simply include it and have all jobs inherit fromApplicationJob
.This would broadly require:
perform_async
rather thanperform_later
Additional notes
This will also allow us to add more details for sentry exceptions, because we can write Sidekiq middlewares to do that.