Skip to content
Browse files

Set procline for easy monitoring with ps aux

  • Loading branch information...
1 parent bc09ccd commit b2c481bef7f5019f273995cb177cff5b3b3f520b @mperham mperham committed Apr 17, 2012
Showing with 7 additions and 0 deletions.
  1. +1 −0 Changes.md
  2. +6 −0 lib/sidekiq/manager.rb
View
1 Changes.md
@@ -1,6 +1,7 @@
1.1.1
-----------
+- Set procline for easy monitoring of Sidekiq status via "ps aux"
- Fix race condition on shutdown [#134]
- Fix hang with cap sidekiq:start [#131]
View
6 lib/sidekiq/manager.rb
@@ -30,6 +30,7 @@ def initialize(options={})
@busy = []
@fetcher = Fetcher.new(current_actor, options[:queues])
@ready = @count.times.map { Processor.new_link(current_actor) }
+ procline
end
def stop(options={})
@@ -152,5 +153,10 @@ def dispatch
def stopped?
@done
end
+
+ def procline
+ $0 = "sidekiq #{Sidekiq::VERSION} [#{@busy.size} of #{@count} busy]"
+ after(5) { procline }
+ end
end
end

0 comments on commit b2c481b

Please sign in to comment.
Something went wrong with that request. Please try again.