Andy Tyra
2007-Dec-08 23:13 UTC
[Backgroundrb-devel] 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: some_key_2
Would this work? Is there some other way to do it? Would the second method
need to be pulled into a separate worker?
Thanks,
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20071208/369de149/attachment.html
hemant kumar
2007-Dec-09 06:25 UTC
[Backgroundrb-devel] Multiple Worker Methods on Different Schedules
On Sat, 2007-12-08 at 15:13 -0800, Andy Tyra wrote:> 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: some_key_2 > > > Would this work? Is there some other way to do it? Would the second > method need to be pulled into a separate worker? >Currently you can''t do that. But its a nice to have this. I would like to have something like this: :schedules: :foo_worker: :foobar: :trigger_args: */5 * * * * * * :data: hello_world :barbar: :trigger_args: */10 * * * * * * :data: Bar_World Can be easily implemented, but again, we will have to change format of backgroundrb.yml because of this. Is this ok?
Andy Tyra
2007-Dec-09 09:28 UTC
[Backgroundrb-devel] Multiple Worker Methods on Different Schedules
I think it''s ideal. If it''s easy, do it! This will make backgroundrb much more flexible. The old version (and when I say that, I mean 0.2.X) did something similar. I think your proposed YML would work just fine. Thanks! On Dec 8, 2007 10:25 PM, hemant kumar <gethemant at gmail.com> wrote:> On Sat, 2007-12-08 at 15:13 -0800, Andy Tyra wrote: > > 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: some_key_2 > > > > > > Would this work? Is there some other way to do it? Would the second > > method need to be pulled into a separate worker? > > > > Currently you can''t do that. But its a nice to have this. I would like > to have something like this: > > :schedules: > :foo_worker: > :foobar: > :trigger_args: */5 * * * * * * > :data: hello_world > :barbar: > :trigger_args: */10 * * * * * * > :data: Bar_World > > Can be easily implemented, but again, we will have to change format of > backgroundrb.yml because of this. Is this ok? > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20071209/1db5f767/attachment.html
Andy Tyra
2007-Dec-09 20:45 UTC
[Backgroundrb-devel] Multiple Worker Methods on Different Schedules
Another thought on this. The proposed YML would not support invoking a
single method on different schedules with different sets of data. What
about this?
:schedules:
:foo_worker:
:foo_job_key_1:
:worker_method: foo_method
:data: foo_data
:trigger_args: 0 */10 * * * * *
:foo_job_key_2:
:worker_method: foo_method
:data: bar_data
:trigger_args: 0 */15 * * * * *
Possible?
On Dec 9, 2007 1:28 AM, Andy Tyra <andy.tyra at gmail.com> wrote:
> I think it''s ideal. If it''s easy, do it! This will make
backgroundrb
> much more flexible. The old version (and when I say that, I mean 0.2.X)
> did something similar. I think your proposed YML would work just fine.
>
> Thanks!
>
>
> On Dec 8, 2007 10:25 PM, hemant kumar <gethemant at gmail.com> wrote:
>
> > On Sat, 2007-12-08 at 15:13 -0800, Andy Tyra wrote:
> > > 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: some_key_2
> > >
> > >
> > > Would this work? Is there some other way to do it? Would the
second
> > > method need to be pulled into a separate worker?
> > >
> >
> > Currently you can''t do that. But its a nice to have this. I
would like
> > to have something like this:
> >
> > :schedules:
> > :foo_worker:
> > :foobar:
> > :trigger_args: */5 * * * * * *
> > :data: hello_world
> > :barbar:
> > :trigger_args: */10 * * * * * *
> > :data: Bar_World
> >
> > Can be easily implemented, but again, we will have to change format of
> > backgroundrb.yml because of this. Is this ok?
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20071209/c84e251d/attachment.html