lib/delayed_paperclip/jobs/sidekiq.rb in delayed_paperclip-2.9.2 vs lib/delayed_paperclip/jobs/sidekiq.rb in delayed_paperclip-2.10.0
- old
+ new
@@ -1,12 +1,18 @@
require 'sidekiq/worker'
+require 'active_support/deprecation'
module DelayedPaperclip
module Jobs
class Sidekiq
include ::Sidekiq::Worker
def self.enqueue_delayed_paperclip(instance_klass, instance_id, attachment_name)
+ ActiveSupport::Deprecation.warn(<<-MESSAGE)
+Using Sidekiq adapter for delayed_paperclip is deprecated and will be removed in version 3.0.0.
+Please use ActiveJob adapter.
+ MESSAGE
+
queue_name = instance_klass.constantize.paperclip_definitions[attachment_name][:delayed][:queue]
# Sidekiq >= 4.1.0
if respond_to?(:set)
set(:queue => queue_name)
else