The method that will be called by the scheduler is :arg_method since
thats how you defined it. The do_work method always gets called once
on worker instantiation. the :worker_method is the method that will
be called by the scheduler.
logger.info('Shoes')
end
def arg_method
logger.info('UrMom')
end
end
UpdateFriendsWorker.register
Shouldn’t the above put an entry ‘Shoes’ in the log every minute? I
only
get 1, and that’s it. Been waiting 5 minutes.
One more question. What is the preferred method for granting workers in
/lib/workers access to my application’s controller classes?
Ezra Z. wrote:
The method that will be called by the scheduler is :arg_method since
thats how you defined it. The do_work method always gets called once
on worker instantiation. the :worker_method is the method that will
be called by the scheduler.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.