lib/plezi/activation.rb in plezi-0.15.0 vs lib/plezi/activation.rb in plezi-0.15.1
- old
+ new
@@ -14,12 +14,13 @@
if @plezi_initialize.nil?
@plezi_initialize = true
self.hash_proc_4symstr # creates the Proc object used for request params
@plezi_autostart = true if @plezi_autostart.nil?
Iodine.patch_rack
- if((ENV['PL_REDIS_URL'.freeze] ||= ENV["REDIS_URL"]))
+ if((ENV['PL_REDIS_URL'.freeze] ||= ENV['REDIS_URL'.freeze]))
uri = URI(ENV['PL_REDIS_URL'.freeze])
- Iodine.default_pubsub = Iodine::PubSub::RedisEngine.new(uri.host, uri.port, 0, uri.password)
+ Iodine.default_pubsub = Iodine::PubSub::RedisEngine.new(uri.host, uri.port, (ENV['PL_REDIS_TIMEOUT'.freeze] || ENV['REDIS_TIMEOUT'.freeze]).to_i, uri.password)
+ Iodine.default_pubsub = Iodine::PubSub::Cluster unless Iodine.default_pubsub
end
at_exit do
next if @plezi_autostart == false
::Iodine::Rack.app = ::Plezi.app
::Iodine.start