Permalink
Browse files

updated readme, plus added new stats for totals

  • Loading branch information...
1 parent 2f3cdc6 commit af1e8714803742bf915d4df90e575dbb00fa6af6 @jamster committed Mar 23, 2011
Showing with 12 additions and 5 deletions.
  1. +3 −0 README.rdoc
  2. +1 −1 lib/resque-statsd.rb
  3. +8 −4 lib/resque/plugins/statsd.rb
View
3 README.rdoc
@@ -2,6 +2,9 @@
Resque Statsd is a Resque plugin that will wrap the enqueueing, performing, failing, as well as timeing job run times withing Graphite monitoring.
+== CURRENT STATUS
+
+COMPLETELY UNTESTED (NOT EVEN TRIED OUT)
== Background Reading
View
2 lib/resque-statsd.rb
@@ -5,7 +5,7 @@
module Resque
module Plugins
- module Loner
+ module Statsd
VERSION = "0.0.1"
end
end
View
12 lib/resque/plugins/statsd.rb
@@ -3,19 +3,23 @@ module Plugins
module Statsd
def after_enqueue_statsd(*args)
- $statsd.increment("#{queue}.enqueued")
+ $statsd.increment("#{@queue}.enqueued")
+ $statsd.increment("total.enqueued")
+
end
def after_perform_statsd(*args)
- $statsd.increment("#{queue}.finished")
+ $statsd.increment("#{@queue}.finished")
+ $statsd.increment("total.finished")
end
def on_failure_statsd(*args)
- $statsd.increment("#{queue}.failed")
+ $statsd.increment("#{@queue}.failed")
+ $statsd.increment("total.failed")
end
def around_perform_statsd(*args)
- $statsd.time("#{queue}.failed") do
+ $statsd.time("#{@queue}.processed") do
yield
end
end

0 comments on commit af1e871

Please sign in to comment.