On Tue, Jul 31, 2012 at 11:12:06AM -0700, Marco S wrote:
>
> I tried this, but this will just to ignore the messages, no other
> ruote-worker-process will pick up the work for this messages.
>
> module Ruote
> class MyWorker < Worker
> def process(msg)
> participant_name = msg['workitem']['participant_name'] rescue nil
> unless participant_name =~ /high_priority/
> return false
> else
> puts "Ruote::MyWorker.process(#{participant_name})"
> super msg
> end
> end
> end
> end
Hello Marco,
instead of "return false", you could do
@context.storage.put_msg(msg['action'], msg)
return true
OK, I've been thinking about your situation and tried a small experiment:
https://github.com/jmettraux/ruote-redis/tree/experiment_pipe_pop
It's pipelining 28 rpops. I found (via
https://github.com/jmettraux/ruote-redis/blob/experiment_pipe_pop/test/bm/loaded.rb
) that it performs faster than the current (mea culpa) single pop.
I haven't tried with multiple workers.
Would you have time to test that (in your staging env somehow)?
--
John Mettraux - http://lambda.io/jmettraux
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en