1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Remove dead code (#4330)

This commit is contained in:
fatkodima 2019-10-10 02:46:10 +03:00 committed by Mike Perham
parent d6b00967ec
commit abd63bde16
6 changed files with 0 additions and 42 deletions

View file

@ -4,21 +4,6 @@ require "fileutils"
require "sidekiq/api"
class Sidekiq::Monitor
CMD = File.basename($PROGRAM_NAME)
attr_reader :stage
def self.print_usage
puts "#{CMD} - monitor Sidekiq from the command line."
puts
puts "Usage: #{CMD} <section>"
puts
puts " <section> (optional) view a specific section of the status output"
puts " Valid sections are: #{Sidekiq::Monitor::Status::VALID_SECTIONS.join(", ")}"
puts
puts "Set REDIS_URL to the location of your Redis server if not monitoring localhost."
end
class Status
VALID_SECTIONS = %w[all version overview processes queues]
COL_PAD = 2

View file

@ -11,8 +11,6 @@ module Sidekiq
module Util
include ExceptionHandler
EXPIRY = 60 * 60 * 24
def watchdog(last_words)
yield
rescue Exception => ex

View file

@ -5,7 +5,6 @@ module Sidekiq
extend WebRouter
CONTENT_LENGTH = "Content-Length"
CONTENT_TYPE = "Content-Type"
REDIS_KEYS = %w[redis_version uptime_in_days connected_clients used_memory_human used_memory_peak_human]
CSP_HEADER = [
"default-src 'self' https: http:",

View file

@ -156,12 +156,6 @@ module Sidekiq
@stats ||= Sidekiq::Stats.new
end
def retries_with_score(score)
Sidekiq.redis { |conn|
conn.zrangebyscore("retry", score, score)
}.map { |msg| Sidekiq.load_json(msg) }
end
def redis_connection
Sidekiq.redis do |conn|
c = conn.connection

View file

@ -36,13 +36,3 @@ def capture_logging(lvl=Logger::INFO)
Sidekiq.logger = old
end
end
def with_logging(lvl=Logger::DEBUG)
old = Sidekiq.logger.level
begin
Sidekiq.logger.level = lvl
yield
ensure
Sidekiq.logger.level = old
end
end

View file

@ -341,14 +341,6 @@ describe Sidekiq::Processor do
Sidekiq.redis {|c| c.flushdb }
end
def failed_job
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['boom'] })
begin
@processor.process(work(msg))
rescue TestProcessorException
end
end
def successful_job
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['myarg'] })
@mgr.expect(:processor_done, nil, [@processor])