lib/weeter/plugins/subscription/redis.rb in weeter-0.15.0 vs lib/weeter/plugins/subscription/redis.rb in weeter-0.17.0

- old
+ new

@@ -21,12 +21,12 @@ Weeter.logger.error(message) end end def listen_for_filter_update(tweet_consumer) - pub_sub_redis.subscribe(@config.subscriptions_changed_channel) - pub_sub_redis.on(:message) do |channel, message| + channel = @config.subscriptions_changed_channel + pub_sub_redis.subscribe(channel) do |message| Weeter.logger.info [:message, channel, message] Weeter.logger.info("Retrieving updated filters from redis") get_initial_filters do |filter_params| Weeter.logger.info("Triggering reconnect Twitter stream with new filters") tweet_consumer.reconnect(filter_params) @@ -39,10 +39,10 @@ def redis @redis ||= create_redis_client end def pub_sub_redis - @pub_sub_redis ||= create_redis_client + @pub_sub_redis ||= create_redis_client.pubsub end end end end