ruby on rails - Debugging Rufus scheduler -
i doing in rails console:
job = scheduler.at 1.minute.from_now service.log.debug 'scheduler works' end job.schedule_info => wed, 07 aug 2013 16:14:46 utc 00:00
scheduler
defined in other file:
require 'rubygems' require 'rufus/scheduler' def scheduler @scheduler ||= rufus::scheduler.start_new end
and when run in console:
service.log.debug 'scheduler works'
service log file written.
problem
scheduler.at 1.minute.from_now service.log.debug 'scheduler works' end
does not write in log after minute. missing? how debug this?
actual problem
i have server in ec2 seems shutdown , scheduled tasks not run.
thing in development environment test task running in 1 minute , works. in server not in console. in console, mentioned failing.
dev environment
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.0.0]
thin 1.5.0
remote environment
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
apache2 2.2.22
passenger 4.0.5
gems
rails 3.2.8
rufus-scheduler 2.0.18
that's classic:
https://groups.google.com/group/rufus-ruby/search?group=rufus-ruby&q=passenger&pli=1 https://groups.google.com/forum/#!searchin/rufus-ruby/passenger (new google groups)
(unfortunately, of links in discussions dead (4 years ago...))
you'll have check passenger configuration see how behaves. you'll have make sure process rufus-scheduler thread started preserved somehow.
take time read passenger configuration / manual , experiment tuning it.
i vaguely remember help:
http://www.modrails.com/documentation/users%20guide%20apache.html#passengerpoolidletime http://www.modrails.com/documentation/users%20guide%20apache.html#passengermininstances
ajet's answer in rufus scheduler not running interesting, advocates:
railsappspawneridletime 0 passengermininstances 1
Comments
Post a Comment