Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @data.each_slice(ENVELOPESIZE) do |envelope|
- content_hash = { "timestamp" => Time.now.to_i, "listname" => @listname, "html" => html, "chtml" => chtml, "txt" => txt, "ctxt" => ctxt, "sub" => sub, "csub" => csub }
- payload = Array[content_hash, envelope]
- Nanite.request("/injection/mailer", Marshal.dump(payload), :selector => :least_loaded) do |res|
- # p "response: #{res}"
- EM.stop_event_loop
- end
- end
- end
- end
- @data is an array that will be in the millions, envelope size im thinking will be around 10,000 (as a guess, need to tune and figure out what performs best)
Add Comment
Please, Sign In to add comment