Skip to content

Commit

Permalink
Remove old poll_interval attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
mperham committed Oct 14, 2015
1 parent 99a3194 commit 9a062a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions lib/sidekiq.rb
Expand Up @@ -153,16 +153,6 @@ def self.logger=(log)
Sidekiq::Logging.logger = log
end

# When set, overrides Sidekiq.options[:average_scheduled_poll_interval] and sets
# the average interval that this process will delay before checking for
# scheduled jobs or job retries that are ready to run.
#
# See sidekiq/scheduled.rb for an in-depth explanation of this value
def self.poll_interval=(interval)
$stderr.puts "DEPRECATION: `config.poll_interval = #{interval}` will be removed in Sidekiq 4. Please update to `config.average_scheduled_poll_interval = #{interval}`."
self.options[:poll_interval_average] = interval
end

# How frequently Redis should be checked by a random Sidekiq process for
# scheduled and retriable jobs. Each individual process will take turns by
# waiting some multiple of this value.
Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/scheduled.rb
Expand Up @@ -105,7 +105,7 @@ def random_poll_interval
# all your Sidekiq processes at the same time will lead to them all polling at
# the same time: the thundering herd problem.
#
# We only do this if poll_interval is unset (the default).
# We only do this if poll_interval_average is unset (the default).
def poll_interval_average
Sidekiq.options[:poll_interval_average] ||= scaled_poll_interval
end
Expand Down

0 comments on commit 9a062a4

Please sign in to comment.