Class: Soter::Config
- Inherits:
-
Struct
- Object
- Struct
- Soter::Config
- Defined in:
- lib/soter/config.rb
Instance Attribute Summary collapse
-
#attempts ⇒ Object
Returns the value of attribute attempts.
-
#db ⇒ Object
Returns the value of attribute db.
-
#fork ⇒ Object
Returns the value of attribute fork.
-
#host ⇒ Object
Returns the value of attribute host.
-
#hosts ⇒ Object
Returns the value of attribute hosts.
-
#logfile ⇒ Object
Returns the value of attribute logfile.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#port ⇒ Object
Returns the value of attribute port.
-
#workers ⇒ Object
Returns the value of attribute workers.
Instance Method Summary collapse
Instance Attribute Details
#attempts ⇒ Object
Returns the value of attribute attempts
2 3 4 |
# File 'lib/soter/config.rb', line 2 def attempts @attempts end |
#db ⇒ Object
Returns the value of attribute db
2 3 4 |
# File 'lib/soter/config.rb', line 2 def db @db end |
#fork ⇒ Object
Returns the value of attribute fork
2 3 4 |
# File 'lib/soter/config.rb', line 2 def fork @fork end |
#host ⇒ Object
Returns the value of attribute host
2 3 4 |
# File 'lib/soter/config.rb', line 2 def host @host end |
#hosts ⇒ Object
Returns the value of attribute hosts
2 3 4 |
# File 'lib/soter/config.rb', line 2 def hosts @hosts end |
#logfile ⇒ Object
Returns the value of attribute logfile
2 3 4 |
# File 'lib/soter/config.rb', line 2 def logfile @logfile end |
#logger ⇒ Object
Returns the value of attribute logger
2 3 4 |
# File 'lib/soter/config.rb', line 2 def logger @logger end |
#port ⇒ Object
Returns the value of attribute port
2 3 4 |
# File 'lib/soter/config.rb', line 2 def port @port end |
#workers ⇒ Object
Returns the value of attribute workers
2 3 4 |
# File 'lib/soter/config.rb', line 2 def workers @workers end |
Instance Method Details
#queue_settings ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/soter/config.rb', line 5 def queue_settings host_settings = host ? {host: host} : {hosts: hosts} host_settings.merge({ port: port, database: db, collection: "soter_queue", timeout: 300, attempts: (attempts || 3) }) end |