lib/pears/provider/subscription.rb in pears-0.0.7 vs lib/pears/provider/subscription.rb in pears-0.0.8

- old
+ new

@@ -22,19 +22,19 @@ # Fetcher is a "Provider" of some sort. @fetcher = fetcher # Setup redis subscription establish_connection(redis_host) - reload + load_config subscribe end def channel @channel ||= @builder.subject_name end - def reload + def load_config @builder.freeze_layers do @data = @fetcher.call.data end end @@ -48,10 +48,10 @@ def subscribe @subscription = Thread.new do connection.subscribe(channel) do |on| on.message do |channel, message| - reload + load_config end end puts "Redis connection died!" end end