mirror of
				https://github.com/mperham/sidekiq.git
				synced 2022-11-09 13:52:34 -05:00 
			
		
		
		
	merge master
This commit is contained in:
		
						commit
						87cae7cbfb
					
				
					 2 changed files with 17 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -17,6 +17,12 @@ Sidekiq::Middleware::Server::Logging -> Sidekiq::JobLogging
 | 
			
		|||
- Rails 3.2 and Ruby 2.0 and 2.1 are no longer supported.
 | 
			
		||||
- Please see the [5.0 Upgrade notes](5.0-Upgrade.md) for more detail.
 | 
			
		||||
 | 
			
		||||
master
 | 
			
		||||
-----------
 | 
			
		||||
 | 
			
		||||
- Fix error class name display on retry page [#3348]
 | 
			
		||||
- More robust latency calculation [#3340]
 | 
			
		||||
 | 
			
		||||
4.2.9
 | 
			
		||||
-----------
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,7 @@ include Sidekiq::Util
 | 
			
		|||
 | 
			
		||||
Sidekiq.configure_server do |config|
 | 
			
		||||
  #config.options[:concurrency] = 1
 | 
			
		||||
  config.redis = { driver: :hiredis, db: 13, port: 6380 }
 | 
			
		||||
  config.redis = { db: 13 }
 | 
			
		||||
  config.options[:queues] << 'default'
 | 
			
		||||
  config.logger.level = Logger::ERROR
 | 
			
		||||
  config.average_scheduled_poll_interval = 2
 | 
			
		||||
| 
						 | 
				
			
			@ -36,14 +36,14 @@ end
 | 
			
		|||
# brew tap shopify/shopify
 | 
			
		||||
# brew install toxiproxy
 | 
			
		||||
# gem install toxiproxy
 | 
			
		||||
require 'toxiproxy'
 | 
			
		||||
#require 'toxiproxy'
 | 
			
		||||
# simulate a non-localhost network for realer-world conditions.
 | 
			
		||||
# adding 1ms of network latency has an ENORMOUS impact on benchmarks
 | 
			
		||||
Toxiproxy.populate([{
 | 
			
		||||
    "name": "redis",
 | 
			
		||||
    "listen": "127.0.0.1:6380",
 | 
			
		||||
    "upstream": "127.0.0.1:6379"
 | 
			
		||||
}])
 | 
			
		||||
#Toxiproxy.populate([{
 | 
			
		||||
    #"name": "redis",
 | 
			
		||||
    #"listen": "127.0.0.1:6380",
 | 
			
		||||
    #"upstream": "127.0.0.1:6379"
 | 
			
		||||
#}])
 | 
			
		||||
 | 
			
		||||
self_read, self_write = IO.pipe
 | 
			
		||||
%w(INT TERM TSTP TTIN).each do |sig|
 | 
			
		||||
| 
						 | 
				
			
			@ -103,7 +103,7 @@ Sidekiq.logger.error "Created #{count*iter} jobs"
 | 
			
		|||
Monitoring = Thread.new do
 | 
			
		||||
  watchdog("monitor thread") do
 | 
			
		||||
    while true
 | 
			
		||||
      sleep 2
 | 
			
		||||
      sleep 1
 | 
			
		||||
      qsize, retries = Sidekiq.redis do |conn|
 | 
			
		||||
        conn.pipelined do
 | 
			
		||||
          conn.llen "queue:default"
 | 
			
		||||
| 
						 | 
				
			
			@ -125,8 +125,8 @@ begin
 | 
			
		|||
  #RubyProf::exclude_threads = [ Monitoring ]
 | 
			
		||||
  #RubyProf.start
 | 
			
		||||
  fire_event(:startup)
 | 
			
		||||
  Sidekiq.logger.error "Simulating 1ms of latency between Sidekiq and redis"
 | 
			
		||||
  Toxiproxy[:redis].downstream(:latency, latency: 1).apply do
 | 
			
		||||
  #Sidekiq.logger.error "Simulating 1ms of latency between Sidekiq and redis"
 | 
			
		||||
  #Toxiproxy[:redis].downstream(:latency, latency: 1).apply do
 | 
			
		||||
    launcher = Sidekiq::Launcher.new(Sidekiq.options)
 | 
			
		||||
    launcher.run
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -134,7 +134,7 @@ begin
 | 
			
		|||
      signal = readable_io.first[0].gets.strip
 | 
			
		||||
      handle_signal(launcher, signal)
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
  #end
 | 
			
		||||
rescue SystemExit => e
 | 
			
		||||
  #Sidekiq.logger.error("Profiling...")
 | 
			
		||||
  #result = RubyProf.stop
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue