diff --git a/Changes.md b/Changes.md index 50521b90..2e6b06e6 100644 --- a/Changes.md +++ b/Changes.md @@ -1,6 +1,7 @@ HEAD ----------- +- Add Ukranian locale [#2561, elrakita] - Disconnect and retry Redis operations if we see a READONLY error [#2550] - Add server middleware testing harness; see [wiki](https://github.com/mperham/sidekiq/wiki/Testing#testing-server-middleware) [#2534, ryansch] diff --git a/myapp/Gemfile b/myapp/Gemfile index 215eaf2d..5fd5ca97 100644 --- a/myapp/Gemfile +++ b/myapp/Gemfile @@ -11,6 +11,7 @@ end gem 'rails' gem 'sidekiq', :path => '..' +#gem 'ruby-prof' #de Does not work with jruby or rbx: #de gem 'pry-byebug' diff --git a/myapp/config/initializers/sidekiq.rb b/myapp/config/initializers/sidekiq.rb index a58ae171..abec8141 100644 --- a/myapp/config/initializers/sidekiq.rb +++ b/myapp/config/initializers/sidekiq.rb @@ -3,9 +3,18 @@ Sidekiq.configure_client do |config| end Sidekiq.configure_server do |config| config.redis = { :size => 25, :namespace => 'foo' } - config.on(:startup) { puts "Hello!" } - config.on(:quiet) { puts "Quiet down!" } - config.on(:shutdown) { puts "Goodbye!" } + config.on(:startup) { } + config.on(:quiet) { } + config.on(:shutdown) do + #result = RubyProf.stop + + ## Write the results to a file + ## Requires railsexpress patched MRI build + # brew install qcachegrind + #File.open("callgrind.profile", "w") do |f| + #RubyProf::CallTreePrinter.new(result).print(f, :min_percent => 1) + #end + end end require 'sidekiq/web'