Class: DisqueJockey::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/disque_jockey/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Configuration

Returns a new instance of Configuration.



6
7
8
9
10
11
12
# File 'lib/disque_jockey/configuration.rb', line 6

def initialize(options={})
  @env = options["env"] || ENV["DISQUE_JOCKEY_ENV"] || "development"
  @worker_groups = (options["worker_groups"] || 2).to_i
  @log_path = options["log_path"] || log_path_default
  @nodes = parse_nodes(options["nodes"]) || ["127.0.0.1:7711"]
  @daemonize = options["daemonize"] || daemonize_default
end

Instance Attribute Details

#daemonizeObject

Returns the value of attribute daemonize.



4
5
6
# File 'lib/disque_jockey/configuration.rb', line 4

def daemonize
  @daemonize
end

#envObject

Returns the value of attribute env.



4
5
6
# File 'lib/disque_jockey/configuration.rb', line 4

def env
  @env
end

#log_pathObject

Returns the value of attribute log_path.



4
5
6
# File 'lib/disque_jockey/configuration.rb', line 4

def log_path
  @log_path
end

#loggerObject

Returns the value of attribute logger.



4
5
6
# File 'lib/disque_jockey/configuration.rb', line 4

def logger
  @logger
end

#nodesObject

Returns the value of attribute nodes.



4
5
6
# File 'lib/disque_jockey/configuration.rb', line 4

def nodes
  @nodes
end

#worker_groupsObject

Returns the value of attribute worker_groups.



4
5
6
# File 'lib/disque_jockey/configuration.rb', line 4

def worker_groups
  @worker_groups
end

Instance Method Details

#daemonize?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/disque_jockey/configuration.rb', line 14

def daemonize?
  @daemonize
end