Displaying 20 results from an estimated 400 matches similar to: "scheduling worker methods in rails"
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:
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 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
2007 Dec 17
11
BackgrounDRb release 1.0 available now
Hi Folks,
I am glad to announce 1.0 release of BackgrounDRb.
This would be a major release since 0.2 release of BackgrounDRb.
Here is a brief summary of changes:
- BackgrounDRb is DRb no longer. It makes use of EventDriven network
programming library packet ( http://packet.googlecode.com ).
- Since we moved to packet, many nasty thread issues, result hash
corruption issues are totally
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
2008 Jan 30
6
Schedule parser
Hi,
I was trying to schedule a worker to run during the midnight hour
like this:
:schedules:
:collector:
:process_something:
:trigger_args: 30 * 0 * * 2,3,4,5,6
When I try to start backgroundrb, the "collector" worker failed to
start up and I find this in backgroundrb_server.log:
/home/mengkuan/apps/testrailsapp/current/vendor/plugins/backgroundrb/
2006 Oct 30
11
BackgrounDRb 0.2.0 Release! Complete rewrite.
Hello Folks-
I am really happy to announce the release of BackgrounDRb 0.2.0 .
This is a complete rewrite and re-architecture of this codebase. I
want to
thank skaar for all of his hard work. I put out a call for help with
the new
architecture and skaar stepped up bigtime. I had already written
the new
scheduler and cron compatible syntax and moved to multi process
architecture. But he
2007 Feb 14
1
Scheduling in backgroundrb not working
Hi ,
How do i schedule a job that can send emails at intervals of time
using backgroundrb and rails
For testing When i hit the controller i''m able send the emails.
but that is not i intend to do .....
I want to use backgroundrb and rails in which i''ll schedule a job
for every 5 minutes/ 1 minute or so..... to send an email
But when i write
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:
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 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 Nov 05
5
backgroundrb preview
Hi Ezra/skaar,
Wow man, the exercise was worth it. The connection closed problem with
socket as i mentioned in my earlier mails...completely disappeared,
and now i can connect only once to the socket and keep reading..till
end of its days.
Literally impossible with older release of backgroundrb.
This could also potentially solve the issues people were having with
ActiveRecord.
As i said
2008 Feb 02
6
Suspended start of task not suspended
Hi
I thought this should suspend the task by 1 minute, but it starts
immediately:
MiddleMan.ask_work( :worker => :bar_worker, :worker_method
=> :test_method, :trigger_args => { :start => (Time.now + 1.minute)})
Is the start argument not allowed in the new backgroundrb (mine is at
rev HEAD (=314))? What can I do about this?
I really need to suspend starting the task as I want
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 Jul 17
0
Backgroundrb scheduler seems to stop running
I have two scheduled tasks in my rails app:
background_schedules.yml
mail_sender_1:
:class: :mail_sender_worker
:job_key: :job_key_mail_sender_1
:worker_method: :do_work
:trigger_args:
:start: <%= Time.now + 5.seconds %>
:end: <%= 1.years.from_now %>
:repeat_interval: <%= 60.minutes %>
cleanup_1:
:class: :cleanup_worker
:job_key: :job_key_cleanup_1
2007 Dec 30
3
A newbie question regarding BackgroundRb
Hi all,
I just read Ezra''s article on BackgroundRb and decided to use it one
of my projects. I installed the plugin into my rails project using
script/plugin and then ran rake backgroundrb:setup to copy the yml
scripts.
Now my backgroundrb.yml looks like
=======
---
port: "22222"
timer_sleep: 60
load_rails: true
environment: development
host: localhost
database_yml:
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 Dec 06
10
Feedback on RC2
I tried to upgrade my existing application to RC2 last night. Like many, I
use this mostly for running scheduled tasks. For the moment, I''ve abandoned
the effort, but am looking forward to being able to use this. Feedback
below:
First, the reason I was looking forward to this upgrade was to use the
threaded scheduler. I have an application with long-running tasks. I found
that