Hi all,<br><br>I found this thread in the August backgroundrb-devel archives. <br><br>>This means that in order to reference the new_worker method *in the <br>>instance that is running in the drb server* you can't do that
<br>>directly. In order to spawn other workers from within a worker I <br>>would have to change the MiddleMan class to be a singleton. This way <br>>you could grab the one instance of it and call new_worker on that and
<br>>it would work as expected. But the way it is currently setup, you <br>>don't have a reference to the Main MiddleMan instance from within <br>>your workers.<br><br>> I don't think making the MiddleMan class be a singleton would affect
<br>>any current code but I will have to test this. If it doesn't interfere then I think it makes sense to turn the MiddleMan into a <br>>singleton. that way you cold gain access to it from within worker <br>>classes.
<br clear="all"><br>I didn't see anything after that date complaining about the issue I'm seeing, so here it is:<br>The start script has two lines of code that call MiddleMan.new. This results in a NoMethodError, <br>because when you include Singleton it makes this method private. Attached is my patch, which I've also
<br>submitted on Rubyforge. It calls MiddleMan.instance, but the parameters to new get nuked. This got my start <br>script working again, but I read that the whole start script will change soon when the new version using slave comes out,
<br>so I'm not sure it'll do anyone much good. Regardless, passing it on for good karma.<br><br>This patch was created against the current rev (as of this writing), which is 47.<br><br>-- <br>Best Regards,<br>Christian Romney
<br><a href="http://www.xml-blog.com">http://www.xml-blog.com</a><br>