[Backgroundrb-devel] Access worker outside of Rails?
Ezra Zygmuntowicz
ezmobius at gmail.com
Fri Sep 8 17:24:28 EDT 2006
On Sep 8, 2006, at 12:22 PM, Wolfgang Borgon wrote:
> Hi all,
> Wondering if it's possible to access a worker from outside of Rails
> -- I've tried simply including:
>
> require RAILS_ROOT + '/vendor/plugins/backgroundrb/backgroundrb.rb'
> BackgrounDRb.MiddleMan.get_worker (key)
>
> but, I get an error that the 'get_worker' method is undefined. Any
> ideas?
> Thanks a lot,
> W
To use it from outside of rails you need to start up a drb client in
your script. So soemthing like this:
#!/usr/bin/env ruby
require "drb"
DRb.start_service
MiddleMan = DRbObject.new(nil, "druby://localhost:22222")
MiddleMan.get_worker(:somekey)
Cheers-
-Ezra
More information about the Backgroundrb-devel
mailing list