Displaying 20 results from an estimated 10000 matches similar to: "Bug in Rails worker creation through scheduler"
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.
2006 Dec 15
3
can Timeout::timeout(...) be used in a Worker ?
Hi ,
I was wondering if anyone else has tried to use the Timeout::timeout
method in a backgroundrb Worker and had Timeout raise an exception
after the allotted amount of time .
I ask because i have written a test script to make sure Timeout would
work . I have tested the script by directly feeding it to ruby with :
$ ruby test_script.rb
and piping the script to the rails console:
$
2008 Apr 02
2
scheduling worker methods in rails
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
i''m trying desperately to schedule some worker methods within rails 2.0.2. The
problem is, both methods don''t even get called by BackgrounDRb.
my background.yml:
> ---
> :backgroundrb:
> :port: 11006
> :ip: 0.0.0.0
> ---
> :schedules:
> :server_worker:
> :update:
> :trigger_args: 1 *
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
2008 Jan 28
4
Scheduling same worker/method at different times with different args
I need to run the same worker''s method twice per day with different
arguments. Unfortunately, only the second entry in the schedule is firing.
I created an experimental worker to verify this:
Worker:
class ExperimentWorker < BackgrounDRb::MetaWorker
set_worker_name :experiment_worker
def create(args = nil)
# this method is called, when worker is loaded for the first time
2006 Dec 03
0
worker is not executed
Hey,
I''ve got a problem where my worker is not being properly executed....
it used to work in an earlier version of brb, but i realized my
vendor/plugins was out of whack, upgraded to the newer schedule-
oriented release (0.2.1). I can start brb, and run the new_worker
middleman, but ntohing happens.
When putting brb in ''run'' mode, i see this:
undefined method
2007 Mar 08
0
worker cant delete?
Hi,
I get the following error from my client program when I try to call delete
after my worker is completed:
goten at goten-server:~/projects/svn_working/m29svn_back/app$ ruby
backup_app.rb {:done=>true, :txt=>["piping to tmp", "piping done",
"getting youngest", "youngest got", "destfile
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 Dec 01
0
Worker won''t start work
(Sorry my last email had the wrong subject)
Hi,
I''ve just installed background rb 0.2.1.
When I try start a worker in my application controller I receive the
following error:
wrong number of arguments (2 for 1) - (ArgumentError)
/home/chris/projects/call_manager/trunk/call_manager_app/vendor/plugins/backgroundrb/server/lib/backgroundrb/middleman.rb:211:in
`initialize''
2007 May 31
0
background worker just stops running after some time
Hi,
I am fairly new to ruby/rails, but I thought I did a fair job of setting up
my background worker, but after some time, maybe 4-5 hours of running, it
just stops running, without any messages. Here is the yml file:
backgroundrb.yml
---
:port: 2000
:rails_env: production
:host: localhost
here is my schedules file:
alerts_task:
:class: :alerts_worker
:job_key: :alerts_key
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 Nov 11
0
Error when creating a new worker -- "Text is not a module - (TypeError)"
Hello everyone,
I''m stuck with this very obscure error whenever I try to create a new
worker. My worker is a subclass of BackgrounDRb::Worker::RailsBase, and if
you follow the stack trace below, you can tell that the error occurs while
trying to load Rails. There is no problem starting up the server, by the
way. Does anyone have any idea what might be causing this? I didn''t have
2007 May 26
0
New worker not being created
I figured out that in the backgroundrb.yml, I had the old setting of making
the database RAILS_ENV. It wasn''t a valid variable in backgroundrb 0.2.1,
and it wasn''t reporting an error, so I had no idea. Once I changed it to
''development'' or ''production'', it started working.
I found that if a worker has an error, it usually logs the error
2007 Jun 04
2
backgroundrb scheduler
I''ve been having a terrible time with the backgroundrb scheduler. The
issues I''m having is that the scheduled actions aren''t ran at all and if
they do, the process stays around forever. I''m using the backgroundrb as a
nightly cron to run some accounting operations.
questions:
1. How can I have the process destroyed after the worker completes?
2. Any idea on
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 Dec 08
3
Multiple Worker Methods on Different Schedules
Quick question: If I want to schedule different worker methods defined in
the same worker to trigger at different times, is this possible? Would the
following scheduler yaml work?
:schedules:
:foo_worker:
:worker_method: method1
:trigger_args: 0 */10 * * * * *
:job_key: some_key_1
:foo_worker:
:worker_method: method2
:trigger_args: 0 */15 * * * * *
:job_key:
2008 Jan 17
2
Inconsistent Model creation behavior
Hi,
I have a relatively simple Worker: (I added the line numbers to the
email, they are not in the worker)
#####################################################################################
class ImagetestWorker < BackgrounDRb::MetaWorker
set_worker_name :imagetest_worker
def create(args = nil)
end
def save_image(args)
@newbook = Book.new
@newbook.comment =
2008 May 29
0
How to know the environment (development/test/production) inside a worker - FIXED
Hi Guys,Looks like I have to do this in backgroundrb.yml
:backgroundrb:
:ip: 0.0.0.0
:production:
:backgroundrb:
:port: 11008 # use port 11008
:environment: production
That is, have an entry for "environment: production" under :production:,
This seems to have fixed the issue.
Regards
Sarat
On 5/29/08, Sarat Kongara <saratkongara at gmail.com> wrote:
>
>
2008 Jan 25
2
Can schedules START a worker?
Hi there,
I''m just working on getting backgroundrb (1.0.1) up and running. I''m no
expert with ruby, etc, so I still don''t quite get a few things.
I have scheduled workers that run every few minutes. That works fine. I
have other workers that run once per day or even once per week. It doesn''t
make sense to have them running all the time. I''d
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