Hi
I have controller code like below
def edit_service_desk_status_after_transfer
ActiveRecord::Base.transaction do
sd_status_history = ServiceDeskStatusHistory.new
sd_status_history.service_desk_ticket_id = sd_ticket.id
sd_status_history.service_desk_status_id sd_ticket.service_desk_status_id
sd_status_history.save
end
#Now I am calling function to send mail
send_mail_to_primary_assignee(assignee_id)
end
def send_mail_to_primary_assignee(contact_id)
official_email_ids ContactEmailAddress.find_all_by_contact_id(contact_id
,:conditions =>
"contact_email_address_type_id = ''2''" )
puts "```````````````````` "
official_email_ids.each do |official_email|
User_mailer.to_send_mail_to_assignee(official_email)
end
puts "```````````````````` "
end
Here my question is should i use a seperate thread for the mail sending
portion(ie,send_mail_to_primary_assignee_function)..To a primary
assignee maximum three mails have to be send..If three is to be used how
can I do that..Since I am very new to threading in ruby..
Thanks in advance
Sijo
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---