2013-07-16 3 views
1

В моем приложении Heroku, у меня есть процесс синхронизации, который нужно периодически выполнять грабли task.I я с помощью заводной gem.Here это код в Lib/clock.rb:Запуск 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 не является неправдоподобным. В чем может быть проблема? Является ли задача rake функцией clock.rb плохой идеей?

ответ

0

Ответ после долгого времени :), но вам нужно добавить Procfile для работы с часовым механизмом с героем. this question может вам помочь.

Смежные вопросы