Permalink
Browse files

Use delayed_jobs default read_ahead value if Delayed::Worker.read_ahe…

…ad has not yet been defined
  • Loading branch information...
1 parent 0f457b8 commit 0ebac054b848e81f9b84e64ed607889dbc1c2123 John Kelly committed Sep 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/dj_mon/dj_report.rb
@@ -64,7 +64,7 @@ def settings
sleep_delay: Delayed::Worker.sleep_delay,
max_attempts: Delayed::Worker.max_attempts,
max_run_time: Delayed::Worker.max_run_time,
- read_ahead: Delayed::Worker.read_ahead,
+ read_ahead: defined?(Delayed::Worker.read_ahead) ? Delayed::Worker.read_ahead : 5,
delay_jobs: Delayed::Worker.delay_jobs,
delayed_job_version: Gem.loaded_specs["delayed_job"].version.version,
dj_mon_version: DjMon::VERSION

0 comments on commit 0ebac05

Please sign in to comment.