Permalink
Browse files

We publish the key we store using the pubsub redis feature

  • Loading branch information...
penso committed May 24, 2013
1 parent d13e9a3 commit 1e4041ad198a29a99ea7f1209847ab21126a4d47
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/batsd/redis.rb
View
@@ -33,6 +33,7 @@ def client
# it as a redis script in Lua
#
def store_and_update_all_counters(timestamp, key, value)
+ @redis.publish key, value
@retentions.each_with_index do |t, index|
if index.zero?
@redis.zadd key, timestamp, "#{timestamp}<X>#{value}"
@@ -46,6 +47,7 @@ def store_and_update_all_counters(timestamp, key, value)
# Store a timer to a zset
#
def store_timer(timestamp, key, value)
+ @redis.publish key, value
@redis.zadd key, timestamp, "#{timestamp}<X>#{value}"
end

0 comments on commit 1e4041a

Please sign in to comment.