when trying this out using the latest from svn or git:
MiddleMan.worker(:testa_worker).async_test()
---
class TestaWorker < BackgrounDRb::MetaWorker
set_worker_name :testa_worker
def create(args = nil)
end
def test
logger.info "sleep"
sleep(5)
logger.info "wake up"
end
end
---
I get this error:
Invalid worker with name testa_worker and key
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_connection.rb:52:in
`ask_worker''
/home/reynard/opt/aptana/workspace/test/vendor/plugins/backgroundrb/server/lib/master_worker.rb:103:in
`async_method_invoke''
/home/reynard/opt/aptana/workspace/test/vendor/plugins/backgroundrb/server/lib/master_worker.rb:37:in
`receive_data''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_parser.rb:44:in
`extract''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_parser.rb:26:in
`loop''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_parser.rb:26:in
`extract''
/home/reynard/opt/aptana/workspace/test/vendor/plugins/backgroundrb/server/lib/master_worker.rb:32:in
`receive_data''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:232:in
`read_external_socket''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:222:in
`handle_external_messages''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:196:in
`handle_read_event''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:192:in
`each''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:192:in
`handle_read_event''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:146:in
`start_reactor''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:139:in
`loop''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:139:in
`start_reactor''
/usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_master.rb:21:in
`run''
/home/reynard/opt/aptana/workspace/test/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in
`initialize''
script/backgroundrb:46:in `new''
script/backgroundrb:46
Client disconected
----
I''m just using the example from the website.
did I miss something?
oh btw, using 1.0.3, I get undefined method async_test. I suppose
that''s new
in 1.0.4?
- reynard
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080904/707160d0/attachment-0001.html>
gethemant at gmail.com
2008-Sep-04 21:25 UTC
[Backgroundrb-devel] Invalid worker with name ...
Yes, thats only available in 1.0.4. On 9/5/08, Reynard <reynard.list at gmail.com> wrote:> when trying this out using the latest from svn or git: > > MiddleMan.worker(:testa_worker).async_test() > > --- > class TestaWorker < BackgrounDRb::MetaWorker > set_worker_name :testa_worker > > def create(args = nil) > end > > def test > logger.info "sleep" > sleep(5) > logger.info "wake up" > end > end > --- > > > I get this error: > > Invalid worker with name testa_worker and key > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_connection.rb:52:in > `ask_worker'' > /home/reynard/opt/aptana/workspace/test/vendor/plugins/backgroundrb/server/lib/master_worker.rb:103:in > `async_method_invoke'' > /home/reynard/opt/aptana/workspace/test/vendor/plugins/backgroundrb/server/lib/master_worker.rb:37:in > `receive_data'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_parser.rb:44:in > `extract'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_parser.rb:26:in > `loop'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_parser.rb:26:in > `extract'' > /home/reynard/opt/aptana/workspace/test/vendor/plugins/backgroundrb/server/lib/master_worker.rb:32:in > `receive_data'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:232:in > `read_external_socket'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:222:in > `handle_external_messages'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:196:in > `handle_read_event'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:192:in > `each'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:192:in > `handle_read_event'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:146:in > `start_reactor'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:139:in > `loop'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_core.rb:139:in > `start_reactor'' > /usr/lib/ruby/gems/1.8/gems/packet-0.1.12/lib/packet/packet_master.rb:21:in > `run'' > /home/reynard/opt/aptana/workspace/test/vendor/plugins/backgroundrb/server/lib/master_proxy.rb:14:in > `initialize'' > script/backgroundrb:46:in `new'' > script/backgroundrb:46 > Client disconected > > ---- > I''m just using the example from the website. > did I miss something? > > oh btw, using 1.0.3, I get undefined method async_test. I suppose that''s new > in 1.0.4? > > > - reynard >-- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org
but when I use the latest from svn, running: MiddleMan.worker(:testa_worker).async_test() gives me this: Invalid worker with name testa_worker and key any idea? - reynard On Thu, Sep 4, 2008 at 5:25 PM, <gethemant at gmail.com> wrote:> Yes, thats only available in 1.0.4. > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080904/20b82a56/attachment.html>
ah, maybe the problem is with the database table not getting created? when you run rake backgroundrb:setup it just create the database immediately so during deployment I just have to manually create the table on prod site? wouldn''t it be nice if the rake task create a migration file and run it, so when deploying we just run the normal migration? - reynard On Thu, Sep 4, 2008 at 5:44 PM, Reynard <reynard.list at gmail.com> wrote:> but when I use the latest from svn, running: > > MiddleMan.worker(:testa_worker).async_test() > > gives me this: > > Invalid worker with name testa_worker and key > > any idea? > > > - reynard > > > > On Thu, Sep 4, 2008 at 5:25 PM, <gethemant at gmail.com> wrote: > >> Yes, thats only available in 1.0.4. >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080904/b8f0d19c/attachment.html>