lib/cellular/jobs/async_messenger.rb in cellular-1.3.0 vs lib/cellular/jobs/async_messenger.rb in cellular-2.0.0
- old
+ new
@@ -1,15 +1,14 @@
-class Cellular::Jobs::AsyncMessenger
- include Sidekiq::Worker
+require 'active_job'
- sidekiq_options queue: :cellular, retry: false
+class Cellular::Jobs::AsyncMessenger < ActiveJob::Base
+ queue_as :cellular
def perform(sms_options)
sms_options.keys.each do |key|
sms_options[key.to_sym] = sms_options.delete key
end
sms = Cellular::SMS.new sms_options
sms.deliver
end
-
end