lib/redistat/event.rb in redistat-0.0.9 vs lib/redistat/event.rb in redistat-0.1.0
- old
+ new
@@ -29,11 +29,14 @@
end
options
end
def default_options
- { :depth => :hour, :store_event => false, :connection_ref => nil }
+ { :depth => :hour,
+ :store_event => false,
+ :connection_ref => nil,
+ :enable_grouping => true }
end
def new?
@new
end
@@ -70,10 +73,10 @@
db.incr("#{self.scope}#{KEY_NEXT_ID}")
end
def save
return false if !self.new?
- Summary.update_all(@key, @stats, depth_limit, @connection_ref)
+ Summary.update_all(@key, @stats, depth_limit, @connection_ref, @options[:enable_grouping])
if @options[:store_event]
@id = self.next_id
db.hmset("#{self.scope}#{KEY_EVENT}#{@id}",
"scope", self.scope,
"label", self.label,
\ No newline at end of file