lib/active_job/cancel.rb in activejob-cancel-0.1.0 vs lib/active_job/cancel.rb in activejob-cancel-0.2.0

- old
+ new

@@ -5,11 +5,11 @@ module ActiveJob module Cancel extend ActiveSupport::Concern - SUPPORTED_ADAPTERS = %w(Sidekiq DelayedJob).freeze + SUPPORTED_ADAPTERS = %w(Sidekiq DelayedJob Resque).freeze def cancel if self.class.can_cancel? self.class.cancel_adapter_class.new.cancel(job_id, queue_name) else @@ -52,6 +52,8 @@ end end end end -ActiveJob::Base.include(ActiveJob::Cancel) +ActiveSupport.on_load(:active_job) do + include(ActiveJob::Cancel) +end