Displaying 20 results from an estimated 30000 matches similar to: "deleting a worker"
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 May 15
4
Need help with singleton worker
We have a fairly expensive task that we''d rather not schedule too many
instances of in parallel.
Couldn''t get pool_size to limit the amount of workers, and I figure
that''s hardly optimal anyway, so would like to have the work queued up
for a single named worker instead, running as soon as possible.
Using MiddleMan.schedule_worker() with :job_key does start off a
2007 Mar 13
5
worker starting twice
Hi gang,
Thanks to other help I''ve gotten on this list, I''ve got backgroundrb
up and running using postgres alongside my rails app. I''ve designed
the system to have several eternally-running workers that periodically
poll the database to see if there''s any work for them to do, and set
things up in the config file to make them restart quickly if any of
them
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 Feb 20
1
error message for record not found ?
I''m using backgroundrb for session management and deletion of visitor-entered information when a session is abandoned. The visitor can either click a button to end their session and remove their data, or backgroundrb will do it for them after 5 minutes of inactivity.
Everything''s working fine, I think. If the visitor explicitly logs out, then when the worker checks for their
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
2008 Jan 22
9
Cannot connect when spawning new workers on demand
Hi!
I''m using the latest&greatest backgroundrb with rails 2.0.2 on ubuntu
dapper.
I''ve made an app that lets you run a query on several servers at once,
which are selected at runtime. Therefore, for each server that is
selected, I spawn a new worker and assign its work.
After everything is completed, the workers are deleted.
I often get this error:
2006 Aug 01
2
actionmailer cant find template in backgroundrb
Im trying to send mails from a backgroundrb worker and it seems like
ActionView cant find my template. same code works as a rake task.
here my worker:
class StatusMailWorker < BackgrounDRb::Rails
repeat 1.minutes # <-- hehe!
def do_work(args)
[...blah...]
NotificationMailer.create_daily_report(users, rep, items)
end
end
end
its throwing the following error:
No
2007 Jan 23
1
Getting results from a dead worker. example?
I''m having a little difficulty understanding how to retrieve results
from deceased workers (from the documentation it seems that it is
possible to do this).
I pasted my simple test below. If anyone could point out what i
should be doing differently i''d be very grateful.
My test worker:
class TestWorker < BackgrounDRb::Worker::RailsBase
def do_work(args)
2007 Apr 06
2
Best way to start a worker
I have installed backgroundrb. I can start it. I have read everything I
can get my hands on, and have read the list for a few months. I have
written a worker, and am ready to start.
This worker reads a queue, and processes it (sends queued emails). Sends 10,
sleeps for a minute, sends 10 until done - very straightforward.
My question is, what would be the best way to run this? I have
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 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
2007 Sep 24
3
Trouble using backgroundrb
Hi all,
I''m a newbie to backgroundrb and am having trouble integrating it into
my rails-app. I''m using namespaces to differentiate between the parts of
my app.
When I want to create a new worker, it seems that it cannot find the
worker object. Here''s my code:
-------------------- controller app/passwd/index --------------------
class Passwd::IndexController <
2007 Jan 30
1
Worker Termination
Do worker processes end after the do_work is complete or do they
need to be terminated explicitly?
Thanks,
Chris
2006 Nov 07
2
start a worker when bdrb starts
I am sure..again I am missing something, but I am trying to start a
worker, when backgroundrb starts and it doesn''t seem to work.
Here is my config/backgroundrb_schedules.yml file:
feed_worker:
class: feed_worker
job_key: feed_worker_key
worker_method: do_work
trigger_args:
repeat_interval: 20.minutes
I even tried this from Rails controller:
# def start_feed_worker
#
2007 Apr 18
5
[BUG] worker stopping abruptly
I have been facing this damn ugly issue since quite sometime.
So this worker reads RSS feed from Yahoo news and stores it in a DB.
The worker is scheduled to run at every 40 minutes and my
background_schedules.yml looks like this:
feed_worker:
:class: :feed_worker
:job_key: :feed_worker_key
:worker_method: :do_work
:trigger_args:
:start: <%= Time.now + 5 %>
2007 Feb 22
1
failed to find slave socket - (RuntimeError)
Hi everyone,
I''ve a class that try to spawn two workers, every 5 seconds.
The code is something like:
while true do
MiddleMan.new_worker(:class => :researches_worker,:job_key
=> :researches)
MiddleMan.new_worker(:class => :products_worker,:job_key => :products)
sleep(5)
end
I''m using ":job_key", so if a worker hasn''t already ended its work
2006 Jul 19
1
Testing worker classes
Hi,
Does it make sense to test a worker class by calling
Middleman.new_worker? Or should I just be testing the functionality in
the do_work method, with, say, a mock object. This seems like a really
ugly DRY violation: you''d need to keep the code in the mock and the
real worker in sync.
That''s the philosophical half of my question. In fact, until someone
tells me why I
2006 Aug 25
1
repeat_every when a worker is not done yet...
If I use repeat_every for a worker, if the do_work function has not
completed by the time the next interval rolls around, will a new
thread be started, resulting in 2 threads for the same worker?
Looking at start_process, it seems like the thread gets created (which
spins off the thread and then continues to execute the start_process
method, right?), then sets the @next_start. So if the
2006 Dec 07
2
backgrounDRb problems with results and MiddleMan
Hi there,
I''ve been experimenting with implementing BackgroundDRb in my rails app but
am running into some problems.
The primary problem I''m getting is in cleaning up worker threads, or getting
any kind of response out of worker threads.
If try using the response function/hash in my Worker the worker will not
execute reporting that response is an unknown variable or function.