发条不记录到Heroku控制台

时间:2015-06-09 00:24:46

标签: ruby-on-rails heroku clockwork

我正在使用Clockwork gem来运行一系列rake任务。一切看起来都不错,但似乎puts命令没有出现在日志中,只是想知道是否有人知道为什么?

require File.expand_path('../../config/boot',        __FILE__)
require File.expand_path('../../config/environment', __FILE__)
require 'clockwork'

include Clockwork

module Clockwork
    configure do |config|
        config[:max_threads] = 30
        config[:thread] = true
    end

    error_handler do |error|
        Airbrake.notify_or_ignore(error)
    end

    handler do |job|
        Rails.logger.info "Enqueuing job: '#{job}'"
    end

    every(60.seconds, 'Test Job') {
        `rake testing_clockwork`
        }

end



desc 'Testing Clockwork'
task :testing_clockwork => :environment do

    puts "Testing Clockwork"

    Rails.logger.info("Testing Clockwork")


end

0 个答案:

没有答案