similar to: Creating workers from workers, calling functions

Displaying 20 results from an estimated 100000 matches similar to: "Creating workers from workers, calling functions"

2007 Jan 22
1
Strange behavior
Ok two things that bug me 1) http://backgroundrb.devjavu.com/projects/backgroundrb/ticket/48 i thought i''ll just post ticket link - but well - it''s strange 2) when i switch base class from RailsBase to Base i can''t access MiddleMan - i get error NameError: uninitialized constant MiddleMan from (drbunix:///tmp/backgroundrbunix_localhost_2999)
2007 Jan 23
0
Error while creating one worker from another
for some strange reason this error occours when i create one worker from another BUT only when i derive worker class from Worker::Base instead or Worker::RailsBase - when change it back it works fine, child worker can have empty do_work, but this error still ocours Bad file descriptor (Errno::EBADF) /var/lib/gems/1.8/gems/slave-1.2.0/lib/slave.rb:214:in `for_fd''
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
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 Nov 12
0
Workers calling Workers
Hello, We are working on a centralized report generating project, which calls for data processing on different servers and then centralizes the reports into a single project. What we would like to do is have a Monitor BackgrounDRb worker call another BackgrounDRb worker to process data on a different server, and then have our Monitor Worker collect the data and then store it according to our
2006 Sep 05
0
connection closed when creating workers with the same key
Hi, I was just creating some new workers (MiddleMan.new_worker) with the same job_key. The first worker for a given key is created correctly. Any subsequent requests to create and greeted with the ''connection closed'' error. I realise that it''s not possible to have two workers with the same key, but maybe a friendlier error message is in order. Chris
2006 Dec 06
0
Testing your workers
This has been asked before, never well attended perhaps. Any thoughts on testing your workers? Current implementation is broken. An empty test case like this: require File.dirname(__FILE__) + ''/../test_helper'' require "#{RAILS_ROOT}/lib/workers/market_summary_worker" require "#{RAILS_ROOT}/vendor/plugins/backgroundrb/lib/backgroundrb.rb" require
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 Jan 22
1
MiddleMan behavior
i found some questions and answers on mailing lists but there is still a problem - when i want to create new worker from within a worker - ::BackgrounDRb::MiddleMan.new_worker(:class => :second_worker, :args => {:id=>2, :text=>"slave"}) works but when i want to get reference to that object: ::BackgrounDRb::MiddleMan.worker(@second) yields: NoMethodError: undefined
2006 Nov 21
0
Reusable workers
Hello, I''m using the scheduler to create several reusable workers of the same type, .e.g., RSSWorker, so I can avoid the overhead of initializing new processes (as suggested by Ezra to my previous question). Creating new workers through the external yaml seems pretty straightforward, but my question is is there a way to call these workers without using the job key? Currently, to use
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
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 Jun 30
0
Worker that launches workers?
I''m just getting started with backgroundRb and have run into a bit of problem... I want to have my controller launch one worker which in turn launches multiple child workers. When trying to use MiddleMan.new_worker in the parent worker I get a "recycled object" error. Is it not possible to launch workers from within another worker? TIA, for any help. - Jordan Glasner
2007 Jun 07
0
Problem with workers starting workers
Hi, I have something like a control worker that gets started from a webservice on request. The control worker should prepare other execution workers and start them. It seems that the execution workers stop working as soon as the control worker has done it?s work and gets released. Is there a way to start workers from other workers without blocking them as soon as the father worker gets
2007 Aug 23
0
"interning empty string - (ArgumentError)" passing AR objects between workers
Hi all, I need some help with this setup I am trying to get working with BackgrounDRb: An autostarted "dispatcher" worker runs every minute and polls some table for jobs that need to be run at that time. For each job found, the "dispatcher" spawns a "runner" worker that runs the job. So in my "dispatcher" worker, I have some code like this:
2007 Jun 27
0
Debugging Workers
Hello all, I just looked through the list and didn''t find a good answer to this.. so posting away. I have some backgorunDRB workers that are all working nicely. In fact, I have no problem right now. But when i was doing the coding, I found a need occasionally to fire up the debugger and have a look at what was going on inside, but found no way to do this directly. Is there a way to
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 20
0
delete workers after use
Hello folks, does backgroundrb delete workers who exited do_work()? i experienced it doesnt (and that freaked me because i didnt know that for several hours). is there a way to let the middleman or so delete workers who did their job imediately after they''re done? if not, i coud think of that as a nice improvement. greetz -- Michael Siebert <info at siebert-wd.de>
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 May 08
0
[PATCH] Unit Testing Rails Workers - It works!
Hey guys, I''ve spent the last two days getting Unit Testing for Rails Workers to work. I''ve posted all the details at this ticket: http://backgroundrb.devjavu.com/projects/backgroundrb/ticket/53 Nate Murray http://pasadenarb.com -------------- next part -------------- An HTML attachment was scrubbed... URL: