Sha256: c9975572c0346db89e286ae5ea928252fcd63f02d4e9546b8383e17937957d48

Contents?: true

Size: 1.42 KB

Versions: 5

Compression:

Stored size: 1.42 KB

Contents

# encoding: UTF-8

if defined? Redis

	# ## Plezi Redis Automation
	# ## ====
	# ##
	# ## sets up Plezi to use Radis broadcast.
	# ## this is less recommended then writing your own tailored solution
	# ##
	# ## If Plezi Redis Automation is enabled:
	# ## Plezi creates is own listening thread for each Controller class that broadcasts using Redis.
	# ## (using the Controller.redis_connection and Controller.redis_channel_name class methods)
	# ##
	# ## this overrides the default Controller#broadcast method which is very powerful but
	# ## is limited to one process.
	# ##
	# ENV['PL_REDIS_URL'] = ENV['REDISCLOUD_URL'] ||= ENV["REDISTOGO_URL"] ||= "redis://username:password@my.host:6389"


	# ## Custom Redis Automation
	# ## ====
	# ##
	# ## create a listening thread - rewrite the following code for your own Redis tailored solution.
	# ##
	# ## the following is only sample code for you to change:
	# RADIS_CHANNEL = 'appsecret'
	# RADIS_URI = URI.parse(ENV['REDISCLOUD_URL'] || "redis://username:password@my.host:6389")
	# RADIS_CONNECTION = Redis.new(host: RADIS_URI.host, port: RADIS_URI.port, password: RADIS_URI.password)
	# RADIS_THREAD = Thread.new do
	# 	Redis.new(host: RADIS_URI.host, port: RADIS_URI.port, password: RADIS_URI.password).subscribe(RADIS_CHANNEL) do |on|
	# 		on.message do |channel, msg|
	# 			msg = JSON.parse(msg)
	# 			# do stuff, i.e.:
	# 			# Plezi.run_async(msg) { |m| Plezi.info m.to_s }
	# 		end
	# 	end
	# end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
plezi-0.8.3 resources/redis_config.rb
plezi-0.8.2 resources/redis_config.rb
plezi-0.8.1 resources/redis_config.rb
plezi-0.7.7 resources/redis_config.rb
plezi-0.7.6 resources/redis_config.rb