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) 端
def perform
begin
recipients.each_with_index do |recipient,i|
end
end
end
end
答案 0 :(得分:1)
在每个失败作业中,延迟处理程序尝试根据定义的重新尝试次数重新执行整个作业数组。