Class: DisqueJockey::Configuration
- Inherits:
-
Object
- Object
- DisqueJockey::Configuration
- Defined in:
- lib/disque_jockey/configuration.rb
Instance Attribute Summary collapse
-
#daemonize ⇒ Object
Returns the value of attribute daemonize.
-
#env ⇒ Object
Returns the value of attribute env.
-
#log_path ⇒ Object
Returns the value of attribute log_path.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#nodes ⇒ Object
Returns the value of attribute nodes.
-
#worker_groups ⇒ Object
Returns the value of attribute worker_groups.
Instance Method Summary collapse
- #daemonize? ⇒ Boolean
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
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(={}) @env = ["env"] || ENV["DISQUE_JOCKEY_ENV"] || "development" @worker_groups = (["worker_groups"] || 2).to_i @log_path = ["log_path"] || log_path_default @nodes = parse_nodes(["nodes"]) || ["127.0.0.1:7711"] @daemonize = ["daemonize"] || daemonize_default end |
Instance Attribute Details
#daemonize ⇒ Object
Returns the value of attribute daemonize.
4 5 6 |
# File 'lib/disque_jockey/configuration.rb', line 4 def daemonize @daemonize end |
#env ⇒ Object
Returns the value of attribute env.
4 5 6 |
# File 'lib/disque_jockey/configuration.rb', line 4 def env @env end |
#log_path ⇒ Object
Returns the value of attribute log_path.
4 5 6 |
# File 'lib/disque_jockey/configuration.rb', line 4 def log_path @log_path end |
#logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/disque_jockey/configuration.rb', line 4 def logger @logger end |
#nodes ⇒ Object
Returns the value of attribute nodes.
4 5 6 |
# File 'lib/disque_jockey/configuration.rb', line 4 def nodes @nodes end |
#worker_groups ⇒ Object
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
14 15 16 |
# File 'lib/disque_jockey/configuration.rb', line 14 def daemonize? @daemonize end |