It appears that the job-iteration gem does not currently define an interruption_adapter for SolidQueue.
How about adding SolidQueue's interruption_adapter in the job-iteration gem to help many people?
This is the kind of content we're expecting.
# frozen_string_literal: true
begin
require "solid_queue"
rescue LoadError
# SolidQueue is not available, no need to load the adapter
return
end
begin
# SolidQueue.on_worker_stop was introduced in SolidQueue 0.7.1
gem("solid_queue", ">= 0.7.1")
rescue Gem::LoadError
warn("job-iteration's interruption adapter for SolidQueue requires SolidQueue 0.7.1 or newer")
return
end
module JobIteration
module InterruptionAdapters
module SolidQueueAdapter
class << self
attr_accessor :stopping
def call
stopping
end
end
end
SolidQueue.on_worker_stop do
JobIteration::Integrations::SolidQueueAdapter.stopping = true
end
register(:solid_queue, SolidQueueAdapter)
end
end
Hi, I am currently using this Gem with Sidekiq as backend. (To be precise, we use maintenance_tasks.)
We are considering moving from Sidekiq to SolidQueue SolidQueue will be the default backend for ActiveJob in Rails v8
It appears that the job-iteration gem does not currently define an interruption_adapter for SolidQueue. How about adding SolidQueue's interruption_adapter in the job-iteration gem to help many people?
This is the kind of content we're expecting.