[Backgroundrb-devel] How to keep from generating more than one worker?

hemant gethemant at gmail.com
Sun Aug 10 07:10:33 EDT 2008


On 8/10/08, 刘昊 <leomayleomay at gmail.com> wrote:
>
>
> Thank you for your reply.

Please, keep the converation on the mailing list. Lots of folks, try
to search archives for similar questions and hence could be useful to
them.

>
> I tried to create a new worker and assign a worker key to it, following is
> what I did in ./script/console:
>
> >> MiddleMan.new_worker(:worker => :hello_worker,:worker_key => "boy")
>  => nil
> >> MiddleMan.worker(:hello_worker).worker_info
> => {:status=>:stopped, :worker=>:hello_worker, :worker_key=>nil}

When, you say:
MiddleMan.worker(:hello_worker).worker_info

you are asking worker_info for worker "hello_worker" which is running
without any worker_key and hence result is expected. Try:

MiddleMan.all_worker_info





-- 
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


More information about the Backgroundrb-devel mailing list