Hello everyone, I still have trouble since the last SVN update. I desperate to instance a backgroundrb worker this way : MiddleMan.worker(:worker => :thumbnailer_worker, :worker_key => "thumbnailing_for_source_" + @source.id.to_s).async_generate_thumbnails(:arg => @source.id) And all i got in my log file is this : Invalid worker with name workerthumbnailer_workerworker_keythumbnailing_for_source_13524 and key /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_connection.rb:52:in `ask_worker'' /home/antz/ declix.com/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:103:in`async_method_invoke'' /home/antz/ declix.com/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:37:in`receive_data'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_parser.rb:44:in `extract'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_parser.rb:26:in `loop'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_parser.rb:26:in `extract'' /home/antz/ declix.com/current/vendor/plugins/backgroundrb/server/lib/master_worker.rb:32:in`receive_data'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_core.rb:230:in `read_external_socket'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_core.rb:220:in `handle_external_messages'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_core.rb:194:in `handle_read_event'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_core.rb:190:in `each'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_core.rb:190:in `handle_read_event'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_core.rb:144:in `start_reactor'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_core.rb:137:in `loop'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_core.rb:137:in `start_reactor'' /usr/lib/ruby/gems/1.8/gems/packet-0.1.9/lib/packet/packet_master.rb:21:in `run'' /home/antz/ declix.com/current/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in`initialize'' script/backgroundrb:46:in `new'' script/backgroundrb:46 Client disconected Packet::InvalidWorker I think i read all about worker loading in the doc and on google.com but i did not find anything to help me. Thanks per advance. -- Bousmanne C?dric Jabber / XMPP : akyrho at gmail.com Mail : akyrho at gmail.com Blog : http://www.parenthese.be/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080722/3334e6d9/attachment.html>
On 7/22/08, C?dric <akyrho at gmail.com> wrote:> Hello everyone, > > I still have trouble since the last SVN update. I desperate to instance a > backgroundrb worker this way : > > MiddleMan.worker(:worker => :thumbnailer_worker, :worker_key => > "thumbnailing_for_source_" + > @source.id.to_s).async_generate_thumbnails(:arg => > @source.id) > > And all i got in my log file is this :First, get *latest* version of backgroundrb from git, also, you can''t chain async_* like that, since in git version it will return worker_key (which was intended behaviour, we had a bug in 1.0.4 where a worker proxy was returned, rather than just worker key). Second update to packet 0.1.9 and write above code like: foo_key = MiddleMan.worker(:worker => :thumbnailer_worker, :worker_key => "thumbnailing_for_source_"+ at source.id.to_s) MiddleMan.worker(:thumbnailer_worker,foo_key).async(arg)
On Tue, Jul 22, 2008 at 7:53 PM, hemant <gethemant at gmail.com> wrote:> On 7/22/08, C?dric <akyrho at gmail.com> wrote: >> Hello everyone, >> >> I still have trouble since the last SVN update. I desperate to instance a >> backgroundrb worker this way : >> >> MiddleMan.worker(:worker => :thumbnailer_worker, :worker_key => >> "thumbnailing_for_source_" + >> @source.id.to_s).async_generate_thumbnails(:arg => >> @source.id) >> >> And all i got in my log file is this : > > First, get *latest* version of backgroundrb from git, also, you can''t > chain async_* like that, since in git version it will return > worker_key (which was intended behaviour, we had a bug in 1.0.4 where > a worker proxy was returned, rather than just worker key). > > Second update to packet 0.1.9 and write above code like: > > > foo_key = MiddleMan.worker(:worker => :thumbnailer_worker, :worker_key > => "thumbnailing_for_source_"+ at source.id.to_s) > MiddleMan.worker(:thumbnailer_worker,foo_key).async(:arg => arg)Lastly, why not pass those args as argument to create method directly?