From 110f0e22784af620068b613557e907af5e0e359f Mon Sep 17 00:00:00 2001 From: Michael Boutros Date: Wed, 18 Jun 2014 01:27:31 -0400 Subject: [PATCH] Added sleep_delay and read_ahead to options for rake tasks. --- lib/delayed/tasks.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/delayed/tasks.rb b/lib/delayed/tasks.rb index ce2d075fd..5cf29761c 100644 --- a/lib/delayed/tasks.rb +++ b/lib/delayed/tasks.rb @@ -21,6 +21,9 @@ :queues => (ENV['QUEUES'] || ENV['QUEUE'] || '').split(','), :quiet => false } + + @worker_options[:sleep_delay] = ENV['SLEEP_DELAY'].to_i if ENV['SLEEP_DELAY'] + @worker_options[:read_ahead] = ENV['READ_AHEAD'].to_i if ENV['READ_AHEAD'] end desc "Exit with error status if any jobs older than max_age seconds haven't been attempted yet."