Displaying 1 result from an estimated 1 matches for "repeat_second".
2008 Jan 28
4
Scheduling same worker/method at different times with different args
...his:
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
end
def experiment(args = {})
logger.info "#{Time.now} - Experiment fired at #{args[:repeat_second]}
second mark."
end
end
In backgroundrb.yml:
:schedules:
:experiment_worker:
:experiment:
:trigger_args: "0 * * * * * *"
:data:
:repeat_second: zero
:experiment:
:trigger_args: "30 * * * * * *"
:data:
:repeat_second: thi...