1

我有以下内容:

/config/delayed_job_config.rb

# Enable DelayedJob Logging
Delayed::Worker.logger = Rails.logger
Delayed::Worker.logger.auto_flushing = 1

# Do not delete failed jobs (default is true)
Delayed::Worker.destroy_failed_jobs = false

# Dont wait so long between jobs
Delayed::Worker.read_ahead = 100 # default was 5
Delayed::Worker.sleep_delay = 1 #default was 5

这里的问题是没有使用设置:

$ rails c
Loading development environment (Rails 3.2.5)
1.9.3-p125 :001 > Delayed::Worker.read_ahead
 => 5 
1.9.3-p125 :002 > Delayed::Worker.sleep_delay
 => 5 

有什么想法吗?谢谢

4

1 回答 1

1

配置进入:

config/initializers/delayed_job_config.rb

文档在这里

于 2012-12-16T23:42:23.907 回答