similar to: Creating workers from workers?

Displaying 20 results from an estimated 5000 matches similar to: "Creating workers from workers?"

2006 Aug 07
2
Autostarting and job keys...
I''ve now got 5 processes auto started. But I when I query the MiddleMan for their keys (in script/console), it doesn''t find them. Looking at the start script, it looks like it might be creating a new MiddleMan object for each autostart BackgrounDRb::MiddleMan.new.new_worker(:class => entry[''class''], Even changing it to
2006 Aug 19
7
Impossible to get stable?
I have concluded that it is impossible to get this background process stable. I am out of ideas and could really use some help. Here is what I have: 50 workers, just running an infinite loop that constantly calls save! on a model. Keep in mind this is just for testing purposes. I catch all exceptions and put them in the log. I am tried setting allow_concurrency to true and false. Neither
2007 Aug 08
3
Cannot start workers in production mode
I have a job that I am starting from a Rails controller in production mode using MiddleMan: MiddleMan.new_worker(:class => :import_ccg_category_worker, :args => { :category_id => @category.id, :remote_category_id => params[:remote_category_id], :description => "Importing CCG products for #{@ category.name}" }) Both of the category ID variables are just basic integers. I
2006 Jul 31
1
Creating workers on server startup?
I have workers that need to be created when I run rake backgroundrb:start. Where do I put this code? Thanks for your help. Thank You, Ben Johnson E: bjohnson at contuitive.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060731/d201c052/attachment.html
2006 Jul 20
9
Including children''s children?
a has many b''s b has many c''s results = A.find params[:id], :include => :b How do you also make sure the b''s include the c''s? Thanks for your help. Thank You, Ben Johnson E: bjohnson@contuitive.com O: 800-341-6826 M: 817-229-4258 -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jul 01
9
BackgrounDRb New release.
Howdy Folks- I''m happy to announce a new release of BackgrounDRb! I have added quite a few new features and included some nice patches from folks on the list. $ script/plugin install svn://rubyforge.org//var/svn/backgroundrb All of the code now stays within the plugin and the start and stop scripts are now just stubs. This makes it easier to tweak or figure out how it works.
2006 Aug 24
1
ActionMailer doesn''t work in backgroundrb
I am pretty confident that mailers do not work in backgroundrb. Can anyone confirm this? Because when I try to do Notifier.deliver_some_method I get an error saying it cant find the templates for my email. The funny thing is that when I run script/ runner Notifier.deliver_some_method it works just fine. Any ideas? Thank You, Ben Johnson E: bjohnson at contuitive.com O: 800-341-6826 M:
2006 Aug 23
5
Singleton-like Worker
Hello there, I need a Worker Class to be Singleton-like, that means there must be at maximum one Instance at a time. When a new Request is made to create another worker of this type, it should return and wait for the other instance to be destroyed. what i need to do: i have a worker who needs to do sth with java and openoffice, and it seems when i have more tha one worker simultaneously,
2007 Mar 13
3
Scheduled worker dies after about 30-45 runs
I have a scheduled worker that runs every minute, checking for new eBay auctions to post. If it finds an auction, then it posts it. If there are no auctions in the database that are queued up, it simply does nothing. I got the worker to finally run as a scheduled worker, every minute. However, after about 30-45 scheduled runs, it simply stops running. My backgroundrb_schedules.yml file: ------
2006 Jul 31
1
delete_worker doesn''t kill the thread?
I made a worker that run an infinite loop and does the following: while true @logger << "logging #{Time.now}" sleep 2 end In my secong console I did: tail log/backgroundrb.log -f This is so I could see the line getting added to the log every 2 seconds. Then in my other console I started script/console and created a new worker. Then killed it with
2006 Aug 18
1
Ezra....allow_concurrency = false?
In a previous email you wrote this: Glad you''re getting some use out of the plugin ;) ActiveRecord does have some issues with threading and concurrency that can sometimes cause that error you are seeing. Open up your script/backgroundrb/ start file and comment out the following line: ActiveRecord::Base.allow_concurrency = true Make sure you do that up in your main app script folder
2006 Aug 06
3
Debugging a worker?
If there is an exception raised in my worker I rescue it and throw it into the log. This is decent, but it would really help to find out more information. Like the line number, the stack trace, etc. Is this possible? Thanks for your help. Thank You, Ben Johnson E: bjohnson at contuitive.com -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Jun 20
2
send objet between 2 workers
Hi, I''m using backgroundrb but I have 2 problems with it. First is when I launch a thread Toto from the do_work method. Toto can''t access to a class variable defined before... (undefined method `+'' for nil:NilClass) I suspect that thread is launched when backgroundrb start but the worker not .. My code is : class MonWorker < BackgrounDRb::Worker::RailsBase
2006 Jun 15
5
Cannot invoke ActiveRecord subclass accessors in DRb worker
Hi there, I''m trying to create a worker to do some asynchronous web client work and update the data model with its results. It seems, however, that every call I make to an ActiveRecord subclass causes the whole thing to block. At least I think it''s blocked. Right now I''m just using debug log output. Is there a decent way to debug/test workers I can try? Is there any
2006 Jul 07
2
Problems installing, please help
I am in my rails project directory and I ran the following command: script/plugin install svn://rubyforge.org//var/svn/backgroundrb and I get this: sh: svn: command not found Any idea how I can install backgroundrb or what the problem is? Any help is greatly appreciated. Thank You, Ben Johnson E: bjohnson at contuitive.com O: 800-341-6826 M: 817-229-4258 -------------- next part
2006 Jul 09
1
Drop down menu in rails?
Does rails have a nifty utility for creating javascript drop down menus? Thanks for the help. Thank You, Ben Johnson E: bjohnson@contuitive.com O: 800-341-6826 M: 817-229-4258 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060709/869e8e30/attachment-0001.html
2006 Jul 07
1
uninitialized constant MiddleMan
I just updated backgroundrb to the latest version, and now I get this: uninitialized constant MiddleMan /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/ active_support/dependencies.rb:123:in `const_missing'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/ active_support/dependencies.rb:131:in `const_missing''
2007 May 22
4
Recommendations for eternally-running backgroundrb workers?
I''ve got some workers that I want to have running all the time. Right now I''m just launching them manually, by requesting a special page in my rails app that includes lines like: MiddleMan.new_worker(:class=> :receiver, :job_key=>:r, :args=>{:sleep_time=>10}) This strikes me as a really weak way to fire up my workers. I basically want to automate things so
2006 Jul 13
4
Update
Folks- I just commited another revision of the plugin. Nothing huge in this update but some extra features. Acl lists are now configurable in the config file. So you will want to blow away and recreate your config file again. Thanks to Georg Friedrich for this. And I applied Gunter Ladwig''s patch for singleton worker classes. These are workers that only have one instance of
2007 Oct 25
3
Mocking Workers in Backgroundrb
Hi Has anyone mocked a call like the following for backgroundrb? MiddleMan.new_worker(:class => :admin_email_worker, :args => params [:email]) I cannot seem to find the correct manner to do it. Would have liked to be able to do MiddleMan.should_receive (:new_worker).with(:class => :admin_email_worker, :args => {"body" => "my message"}) Cheers Shane