Starfish for mail processing

I’m trying to use Starfish to process mail as per:
http://tech.rufy.com/2006/08/how-i-sent-emails-10x-faster-than.html

My starfish file currently looks like


require ‘config/environment’
require ‘mail_queue’
require ‘email_sender’

server do |map_reduce|
map_reduce.type = MailQueue
map_reduce.conditions = “sent_at IS NULL”
end

client do |mail_queue|
mail_queue.dispatch_queue_item
end


It’s giving me an error:
mail_queue_process.rb:13: undefined method `dispatch_queue_item’ for
#Array:0x34f26f0 (NoMethodError)

So it looks like the object map_reduce is retrieving is an array rather
than an ActiveRecord object “MailQueue”.

Where am I going wrong? There doesn’t seem to be a great deal of
documentation on Starfish.

David

The only correct types allowed in starfish are ActiveRecord and File,
MailQueue is not a correct type.

-Lucas
http://rufy.com/

David S. wrote:

I’m trying to use Starfish to process mail as per:
http://tech.rufy.com/2006/08/how-i-sent-emails-10x-faster-than.html

My starfish file currently looks like


require ‘config/environment’
require ‘mail_queue’
require ‘email_sender’

server do |map_reduce|
map_reduce.type = MailQueue
map_reduce.conditions = “sent_at IS NULL”
end

client do |mail_queue|
mail_queue.dispatch_queue_item
end


It’s giving me an error:
mail_queue_process.rb:13: undefined method `dispatch_queue_item’ for
#Array:0x34f26f0 (NoMethodError)

So it looks like the object map_reduce is retrieving is an array rather
than an ActiveRecord object “MailQueue”.

Where am I going wrong? There doesn’t seem to be a great deal of
documentation on Starfish.

David

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs