私の Heroku アプリケーションには、rake タスクを定期的に実行する必要があるクロック プロセスがあります。
require File.expand_path('../../config/boot', __FILE__)
require File.expand_path('../../config/environment', __FILE__)
require 'clockwork'
include Clockwork
every(1.day, 'API Data Fetching', :at => '18:31') { `rake build_index` }
Heroku のログ スニペットは次のとおりです。
2013-07-15T18:31:00.716092+00:00 app[clock.1]: I, [2013-07-15T18:31:00.673880 #2] INFO -- : Triggering 'API Data Fetching'
2013-07-15T18:31:39.131681+00:00 app[clock.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
2013-07-15T18:31:39.132841+00:00 app[clock.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
2013-07-15T18:31:39.132346+00:00 app[clock.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
タスクは実行されておらず、API データはフェッチされていません。問題は何ですか?clock.rb から rake タスクを実行するのは悪い考えですか?