Sha256: 20843f87c181c5686d918126da2ce2935c29960b832c31884af7f88440644ddb

Contents?: true

Size: 551 Bytes

Versions: 16

Compression:

Stored size: 551 Bytes

Contents

module Sad
	class Config
		class << self
			def namespace=(str)
				@_namespace = str
			end

			def namespace
				@_namespace || 'SadQueue'
			end

			def queue(q)
				[Sad::Config.namespace, q].join ':'
			end

			def redis=(uri)
				@_redis_url = uri
			end

			def redis
				@_redis ||= EM::Hiredis.connect(@_redis_url)
			end

			def interval=(int)
				@_interval = int.to_i
			end

			def interval
				@_interval ||= 3
			end

			def max_retry=(int)
				@_max_retry = int.to_i
			end

			def max_retry
				@_max_retry ||= 3
			end
		end
	end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sad-1.5.14 lib/sad/config.rb
sad-1.5.13 lib/sad/config.rb
sad-1.5.12 lib/sad/config.rb
sad-1.5.11 lib/sad/config.rb
sad-1.5.10 lib/sad/config.rb
sad-1.5.9 lib/sad/config.rb
sad-1.5.8 lib/sad/config.rb
sad-1.5.7 lib/sad/config.rb
sad-1.5.6 lib/sad/config.rb
sad-1.5.5 lib/sad/config.rb
sad-1.5.4 lib/sad/config.rb
sad-1.5.3 lib/sad/config.rb
sad-1.5.2 lib/sad/config.rb
sad-1.5.1 lib/sad/config.rb
sad-1.5.0 lib/sad/config.rb
sad-1.4.0 lib/sad/config.rb