Hi
I have rake code as below…What I am doing is sending mail to
sd_records=ServiceDeskTicket.find :all, :conditions=>[“updated_on < ?
and service_desk_status_id != ?”,48.hours.ago,6]
for record in sd_records
puts “Service desk number is #{record.number}”
#Now to each such sd ticket primary group assignee mails is to
be send
end
Here inside for loop I have to send mail to primary_assignee of the
group responsible for each of the service desk ticket…This rake task is
executed on each 1 hour…So my question is should the mail sending
portion (inserting in for loop) be done as seperate threads…I am using
spawn to that…My doubt is if say some thousands of service desk tickets
this will create that much processes…Is that the right solution?Or not
spawn it just continue and write code for mail send in the above for
loop…Could you please give me a good advise?
Thanks in advance
Sijo