Displaying 20 results from an estimated 9000 matches similar to: "new syntax for autostart and repeat"
2007 Feb 15
0
disregard RE: new syntax for autostart and repeat
So disregard this question. I followed Mason Hale''s suggestion that I pass
in some worker_args and all is well in the scheduler.yml file.
Brian
_____
From: Brian Lucas [mailto:blucasCO at gmail.com]
Sent: Thursday, February 15, 2007 2:49 PM
To: ''backgroundrb-devel at rubyforge.org''
Subject: new syntax for autostart and repeat
Hello:
I''m a
2007 Apr 04
0
autostart
Hi,
Does backgroundrb 0.2.1 support autostart?
I''ve tried to set up autostart by adding something like the following
in backgroundrb.yml:
autostart:
1:
class: bar_worker
args: ''''
However, that does not seem to work. I also tried the scheduling
mechanism like this in backgroundrb_schedules.yml:
bar:
:class: :bar_worker
:job_key: :bar1
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 Feb 18
2
backgroundrb launches concurrent instances of same job
Hi there,
Backgroundrb is working pretty well for me but I have a job that launches
two of the same job, apparently a minute(?) apart from each other. Should
this be happening if I have repeat interval enabled with a job_key? It
seems like it should wait until the job is finished before launching a new
instance.
--Backgroundrb_schedules.yml--
city_updater:
:class: :city_updater_worker
2008 Jan 31
2
cron scheduling problem
I''m running a fresh checkout of release 1.0.1 ...
It''s now 11:32 am local time on January 31.
I''ve configured a single worker for a test.
If I use the following schedule in my background.yaml file:
:schedules:
:debugger_worker:
:ping:
:trigger_args: 0 35 11 * * * *
Backgroundrb starts up without error.
If I make the following
2006 Dec 13
4
Unintended thread forked in autostart
Hello all,
I''ve got the problem about the following simple application using
autostart and repeat_every.
A thread(?) is forked for processing task at first, but at sencond time
two threads seem to be forked.
My simple application code is...
- In worker class
class FooWorker < BackgrounDRb:Rails
repeat_every 2.minutes
first_run Time.now
def do_work
puts Time.now.to_s +
2006 Jul 31
1
[PATCH-SUGGESTION] autostarting workers
Hi there,
as i stated before in my talk with Ben Johnson, I hacked a little bit and
here it is - autostarting jobs. I think someone (eh... Ezra) should review
it and check to see if i made any mistakes. Also i dont have the possibility
to test it on other-than-Windows systems, but since the calling process
works just the same, it should do well...
Now the neccesary evil, the documentation...
If
2007 May 04
1
Setting environment
> Chris T wrote:
> > Not sure this is known behaviour but it seems that if want to set
> the
> > environment to, for example, test, and you want to use Active
> Record you
> > have to both explicitly set the RAILS_ENV and the BackgrounDRb
> environment.
>
> I ran into essentially the same problem (needing to run BRB in the
> test
> environment so
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
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 Nov 20
2
schedule support on latest svn, a question
I''m running the latest backgroundrb mainly for scheduled tasks support.
As per the documentation I created the backgroundrb_schedules.yml with
the following:
simple_label:
:class: :document_sorter_worker
:worker_method: :do_work
:job: :bleh
:trigger_args:
:start: <%= Time.now + 5.seconds %>
:end: <%= Time.now + 10.minutes
:repeat_interval: 1.minute
Under
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 Feb 12
1
-c switch in the startup command
I have been strugging with getting backgroundrb to stay in the correct
environment using multiple configuration files and the -c switch when
starting backgroundrb.
If I start brb like this:
./script/backgroundrb run RAILS_ENV=development -- -c
../config/development_background.yml
where development_background.yml specifies "development" for rails_env and
environment, the first worker
2007 May 31
0
Slave socket problem again
Hello!
I have been using backgroundrb for a small project. My worker task is
run every minute, checks the processing queue in data-base and execute
the business method from Rails if something is to be done.
Unfortunately I was hit by the problem of backgroundrb server dying
after some runs. The exception is:
20070531-11:06:05 (31816) Starting worker: s_e_work sql_exe
(s_e_work_sql_exe) ()
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 Jul 19
1
Scheduler skipping schedules
There is a line in the backgroundrb codebase:
sleep 0.1 # TODO this is dangerous; could skip over some jobs
Could this explain why my scheduler stops triggering?
It only seems to work for about 12 - 24 hours before schedules are
being skipped...
Once I changed the times to using cron trigger in
backgroundrb_schedules.yml and set the times to every 37th and 59th
minute of the hour, instead of
2006 Dec 11
1
scheduled only called once
when working with the scheduler i found that using
:trigger_args: 0 * * * * * *
in config/backgroundrb_schedules.yml the worker gets only called once.
:trigger_args: "0 * * * * * *" works as expected.
Maybe this should be changed in the README ?
regards tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2008 Mar 18
1
Polling is REALLY slow
I''m having some trouble with using brb for polling for work. Basically, what
I want to do is update the state of a record and have brb notice and start a
process. I do not want to call ask_work for each process because there may
be several places where the object''s state is changed, and I only want to
process once. Plus, I can schedule things better this way. My first
thought
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 Jun 05
0
typo in the README?
In the section under "Trigger" it says:
The plain trigger takes three arguments:
>
> | :start => time, :end => time, :interval => seconds
>
> If the end argument is omitted, the event will trigger at the interval as
> long as the server is running.
>
Shouldn''t it be :repeat_interval?
Everything below it in both the backgroundrb_schedules.yml and