lib/dashing.rb in dashing-rails-2.6.1 vs lib/dashing.rb in dashing-rails-2.6.2

- old
+ new

@@ -18,11 +18,13 @@ files.sort.first end def send_event(id, data) event = data.merge(id: id, updatedAt: Time.now.utc.to_i).to_json - redis.hset("#{Dashing.config.redis_namespace}.latest", id, event) - redis.publish("#{Dashing.config.redis_namespace}.create", event) + redis.with do |redis_connection| + redis_connection.hset("#{Dashing.config.redis_namespace}.latest", id, event) + redis_connection.publish("#{Dashing.config.redis_namespace}.create", event) + end end end end