Skip to content

Commit

Permalink
Update workers/lead_worker.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Reeder committed Sep 19, 2012
1 parent 60d96ac commit 632dc51
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions workers/lead_worker.rb
Expand Up @@ -10,15 +10,10 @@

puts "params: #{params.inspect}"

# Setup our client libs
config = params[:config]

lead = Contact.new
lead.name = params[:name]
lead.email = params[:email]
lead.company = params[:company]

mq = IronMQ::Client.new(token: config[:iron][:token], project_id: config[:iron][:project_id])
# boomi_mq is the for the shared queues for the Boomi integration
# boomi_mq is using the shared project for the Boomi integration
boomi_mq = IronMQ::Client.new(token: config[:iron][:token], project_id: config[:iron][:boomi_project_id])
ic = IronCache::Client.new(token: config[:iron][:token], project_id: config[:iron][:project_id])
iw = IronWorkerNG::Client.new(token: config[:iron][:token], project_id: config[:iron][:project_id])
Expand All @@ -39,8 +34,8 @@
puts "Putting message on queue: " + msg.inspect
boomi_mq.queue('lead').post(msg.to_json)

# Queue up email worker
puts "Queuing up email"
# now queue up email worker
iw.tasks.create('email_worker', config['email'].merge(
to: lead.email,
subject: "Thanks for the Lead!",
Expand Down

0 comments on commit 632dc51

Please sign in to comment.