Class: QPush::Server::Config

Inherits:
Base::Config show all
Defined in:
lib/qpush/server/config.rb

Constant Summary collapse

SERVER_DEFAULTS =
{
database_url: ENV['DATABASE_URL'],
database_pool: 10,
jobs_path: '/jobs',
workers: [WorkerConfig.new] }.freeze

Constants inherited from Base::Config

Base::Config::DEFAULTS

Instance Attribute Summary collapse

Attributes inherited from Base::Config

#redis_pool, #redis_url

Instance Method Summary collapse

Methods inherited from Base::Config

#redis

Constructor Details

#initializeConfig

Returns a new instance of Config.



43
44
45
46
# File 'lib/qpush/server/config.rb', line 43

def initialize
  super
  SERVER_DEFAULTS.each { |key, value| send("#{key}=", value) }
end

Instance Attribute Details

#database_poolObject

Returns the value of attribute database_pool.



41
42
43
# File 'lib/qpush/server/config.rb', line 41

def database_pool
  @database_pool
end

#database_urlObject

Returns the value of attribute database_url.



41
42
43
# File 'lib/qpush/server/config.rb', line 41

def database_url
  @database_url
end

#jobs_pathObject

Returns the value of attribute jobs_path.



41
42
43
# File 'lib/qpush/server/config.rb', line 41

def jobs_path
  @jobs_path
end

#workersObject

Returns the value of attribute workers.



41
42
43
# File 'lib/qpush/server/config.rb', line 41

def workers
  @workers
end