Reputation: 64
counter.times do
count_var+= 1
range1 = process_limit * count_var
sms = Delayed::Job.enqueue(SmsManager.new(arr_msg_array[i1...range1], recipients[i1...range1], student_type[i1...range1], reciver_type[i1...range1], reciver_id[i1...range1], created_by[i1...range1])) i1= range1
end
----------
class SmsManager
attr_accessor :recipients, :message, :astudent_type, :areciver_type, :areciver_id, :acreated_by
def initialize(message, recipients, student_type, caregiver_type, receiver_id, created_by) end
def perform
begin
recipients.each_with_index do |recipient,i|
end
end
end
end
Upvotes: 0
Views: 155
Reputation: 64
On every failure job , delayed handler tries to re execute the whole array of jobs as per the number of defined reattempts.
Upvotes: 1