Displaying 20 results from an estimated 10000 matches similar to: "Testing workers"
2008 Apr 03
3
remote workers
Hi,
I am kind of lost on how to configure the backgroundrb workers to run
from a remote host?
Suppose I have my main rails app in 1.2.3.4, and I want my
backgroundrb workers to run from a machine with ip 5.6.7.8, what do I
put
in my backgroundrb.yml file? How will my workers know which database
server to load the models from?
Thanks,
Ram
2007 Sep 18
1
best practices for robust workers
Hi folks,
I''ve got some BackgroundRB workers to handle a long running task  
(triggered by a user) that work very well on my staging server, and I  
just wanted to check to see if anyone had any advice before I put it  
into production.
When I start the worker (which performs an import), I write a record  
to my database for each import. The record gets updated by the worker  
to
2007 May 03
1
Reloadable workers? (Rails Testing without DRb restart?)
Hey guys, I just opened up my first installation of BackgrounDRb and  
so far I love it. I''ll have to share this plugin at my next Ruby  
Brigade meeting!
I have one question though: Is there a way that I can run the  
BackgrounDRb server in a "test" mode that will reload my changes  
without having to restart every time? (Similar to how mongrel does  
this with my
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
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
 
2008 May 04
3
Rails Configuration in Workers
I override some Rails'' configuration options in my project, like:
     config.database_configuration_file = "#{RAILS_ROOT}/local/config/ 
database.yml"
But they aren''t picked up in BackgroundRB because Rails ActiveRecord  
is just initialized directly in MasterWorker#load_rails_env:
       db_config_file = YAML.load(ERB.new(IO.read("#{RAILS_HOME}/ 
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
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
2007 Mar 05
2
Scheduled workers only run once unless you call self.delete inside the worker
I had a worker scheduled to run every minute with
backgroundrb_schedules.yml:
ebay_runner:
  :class: :ebay_auction_worker
  :job_key: :ebay_auction_runner
  :trigger_type: :cron_trigger
  :trigger_args: 0 * * * * * *
This worker posts an auction to eBay from a queue of auctions every minute.
I was having a problem where the worker would run ok the first time, but
never any subsequent minutes
2006 Aug 01
4
Creating workers from workers?
Since MiddleMan is an uninitialized constant in a worker how do you  
create new workers inside a worker?
Thank You,
Ben Johnson
E: bjohnson at contuitive.com
O: 800-341-6826
M: 817-229-4258
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060731/75a77fa6/attachment-0001.html
2007 Aug 01
4
stability of using scheduled workers
Hi,
Going through the archive, and just keeping a general watch on this list seems to indicate that there are some issues using scheduling with backgroundrb.  I need a worker that will perform some actions on an hourly interval.  These actions will require access to several of the models in my application.  I am currently using backgroundrb to handle processing of files, where I spawn a worker to
2007 Nov 07
2
workers cleanup
Hi,
I''m using backgroundrb 0.2.1 and having problem with worker processes
staying around when the rails application does not explicitly delete
them.
Is there a way to automatically delete the worker processes when it
has completed the job?
Also does killing the process manually (using kill command) harm the
backgroundrb server? I have some occasions where the backgroundrb
server just
2008 Mar 20
2
can''t call any methods on workers
Hi,
I''m a long time backgroundrb user, still stuck using the very ancient  
original version from Ezra (not even Ezra''s 2.0 version, I''m using the  
one that didn''t really have a version number).  The 2.0 version did  
very little but crash for me.  Anyway I finally got some time set  
aside to try out this new version you all have been developing. 
2007 Apr 26
2
looking for a worker that''s gone
In my app, I store the job key when a worker is fired off and then  
check back in periodically to see how its doing.  The workers delete  
themselves when they''re done.  I would expect when I try to get  a  
worker that has been deleted, I would get nil or a proper exception,  
but instead I get:
  >> MiddleMan.worker(''foobar'')
NoMethodError: undefined method
2006 Jul 03
6
Req: Workers as singletons
Hi,
it would be nice to be able to specify workers as singletons. By this  
I mean that every call to the new_worker method returns the same  
instance of said worker. This can be done transparently either by  
adding a new argument to new_worker (something like :singleton =>  
true) or adding a new method, like I did in my installation of  
BackgrounDrb:
     def get_worker_by_class(klass)
 
2007 Dec 22
2
Implementation details for worker Queue
Hi All,
One can easily code a backgroundrb worker so as it can act as a worker
queue, having reached a stable status, perhaps its time we should add
this feature.
Why?
Because if you are already running your application using
BackgrounDRb, perhaps you don''t want to manage other solutions when
capability to do that is right there with you.
Interface?
This where i need feedback. You can
2006 Aug 07
2
uninitialized constants in worker class
I am new to this list and relatively new to the backgroundrb plugin,. So
first i will say hello to everybody here, especially to Ezra
Zygmuntowicz!
I played a little bit with a dummy worker and so far everything worked
well.
But now i want to do real work in a worker but now i get that error[1].
It looks like that the constants configured in environment* configs are
not available to the worker
2008 May 21
2
How to know the environment (development/test/production) inside a worker
Hi Guys,You can start backgroundRb in different environments using -e
option.
./script/backgroundrb -e production
I like to run a rake task from my worker - something like rake
RAILS_ENV=proper_environment thinking_sphinx:start
I am not sure how to figure out the environment with which the backgroundRb
is started from inside a worker task. Any help is appreciated. Thanks for
your time.
Regards
2007 Nov 21
2
Is fork { } safe inside of a worker? How else may this be done...
I have a BackgrounDRb worker running every 2 minutes. Here''s the basic idea:
- events = Event.find_all_pending( 2.minutes )
- while( all events have yet to be processed )
---- if( Time.now <= event.time_to_process )
------- fork { process_event }
--- end
--- sleep( 0.25 )
- end
- puts "Done..."
Events that need to be processed within the next 2 minutes are loaded and
2006 Nov 08
3
0.2.0 worker/slave creation
We ran into some problems accessing a freshly created worker, and had to
insert a sleep of 1 second to get it to work.  It looks like Ezra and skaar
already know this:
from middleman.rb:
        # HACK: there is a race in the worker/slave creation, we
        # currently need to sleep between create.
        sleep 0.1
You might want to increase it to 1 second for those of us on slowly mac
books.