Folks- I just pushed out a new release last night. THis is a bug fix release as well as some new features that have come up that people need. I made the MiddleMan class include Singleton so it is now a true singleton. What this means is that the autostart stuff now works correctly because you can always get the same MiddleMan instance from anywhere within the drb server including your workers. This means that if you want to, you can start new workers from within a worker like so: #in a worker class @key = spawn_worker :class => :foo, :args => ''whatever'' This also means that you can now finally kill your worker completely from within itself when you are done with it. THis is for everyone who needs to fire off a worker and forget it and let it clean up after itself. To kill a worker from within itself do this: #in worker class, kill with no args kills the current worker kill # if you spawned another worker from within your worker and you have its job key you can kill it too kill(job_key) I also went in a refactored some code and added more test cases. Things are purring pretty nicely now. This release still does not address the cron worker issue. I will be working on that here soon to see what I can do to make it more cron like. Please download the new version and test your stuff with it for me. I don''t think this release should affect and pre existing code you have, it just made things cleaner internally. Cheers- -Ezra
Erza, I just tried to update to the new release. Upon start, this is the error: script/backgroundrb/start:100: private method `new'' called for BackgrounDRb::Mid dleMan:Class (NoMethodError) Philip
Solved. Interesting. Actually I found out that by re-installing/upgrading, I need to nuke the script directory first so that "rake backgroundrb:setup" will generate/copy over the new scripts as well. (The initial README mentions blowing away only the config/backgroundrb.yml.) Although now two warning lines (very syntactic): script/backgroundrb/start:94: warning: don''t put space before argument parentheses script/backgroundrb/start:104: warning: don''t put space before argument parentheses (BTW, sorry about hitting the wrong option and posting a new message instead of a reply for this correspondence) On 8/8/06, Philip Lipu Tsai <tsailipu at gmail.com> wrote:> Erza, > > I just tried to update to the new release. Upon start, this is the error: > > script/backgroundrb/start:100: private method `new'' called for BackgrounDRb::Mid > dleMan:Class (NoMethodError) > > Philip >
Hey- Yeah sorry I should have mentioned that you need to blow away the script/backgroundrb dir and reinstall to do an upgrade. I fixed the warning as well and checked it in again. Thanks- -Ezra On Aug 8, 2006, at 3:04 PM, Philip Lipu Tsai wrote:> Solved. Interesting. Actually I found out that by > re-installing/upgrading, I need to nuke the script directory first so > that "rake backgroundrb:setup" will generate/copy over the new scripts > as well. (The initial README mentions blowing away only the > config/backgroundrb.yml.) > > Although now two warning lines (very syntactic): > > script/backgroundrb/start:94: warning: don''t put space before argument > parentheses > script/backgroundrb/start:104: warning: don''t put space before > argument parentheses > > (BTW, sorry about hitting the wrong option and posting a new message > instead of a reply for this correspondence) > > > On 8/8/06, Philip Lipu Tsai <tsailipu at gmail.com> wrote: >> Erza, >> >> I just tried to update to the new release. Upon start, this is >> the error: >> >> script/backgroundrb/start:100: private method `new'' called for >> BackgrounDRb::Mid >> dleMan:Class (NoMethodError) >> >> Philip >> > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel
possibly you could use the setup.rb to copy over the scripts in next release? 2006/8/9, Ezra Zygmuntowicz <ezmobius at gmail.com>:> > Hey- > > Yeah sorry I should have mentioned that you need to blow away the > script/backgroundrb dir and reinstall to do an upgrade. I fixed the > warning as well and checked it in again. > > Thanks- > -Ezra > > On Aug 8, 2006, at 3:04 PM, Philip Lipu Tsai wrote: > > > Solved. Interesting. Actually I found out that by > > re-installing/upgrading, I need to nuke the script directory first so > > that "rake backgroundrb:setup" will generate/copy over the new scripts > > as well. (The initial README mentions blowing away only the > > config/backgroundrb.yml.) > > > > Although now two warning lines (very syntactic): > > > > script/backgroundrb/start:94: warning: don''t put space before argument > > parentheses > > script/backgroundrb/start:104: warning: don''t put space before > > argument parentheses > > > > (BTW, sorry about hitting the wrong option and posting a new message > > instead of a reply for this correspondence) > > > > > > On 8/8/06, Philip Lipu Tsai <tsailipu at gmail.com> wrote: > >> Erza, > >> > >> I just tried to update to the new release. Upon start, this is > >> the error: > >> > >> script/backgroundrb/start:100: private method `new'' called for > >> BackgrounDRb::Mid > >> dleMan:Class (NoMethodError) > >> > >> Philip > >> > > _______________________________________________ > > Backgroundrb-devel mailing list > > Backgroundrb-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel >-- Michael Siebert <info at siebert-wd.de> www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060809/304c3121/attachment-0001.html