Class: QPush::Config
- Inherits:
-
Object
- Object
- QPush::Config
- Defined in:
- lib/qpush/config.rb
Constant Summary collapse
- DEFAULTS =
{ redis_url: ENV['REDIS_URL'], database_url: ENV['DATABASE_URL'], redis_pool: 10, database_pool: 10, workers: 2, namespace: 'default', queue_threads: 2, perform_threads: 2, delay_threads: 1, priorities: 5, jobs_path: '/jobs' }.freeze
Instance Attribute Summary collapse
-
#database_pool ⇒ Object
Returns the value of attribute database_pool.
-
#database_url ⇒ Object
Returns the value of attribute database_url.
-
#delay_threads ⇒ Object
Returns the value of attribute delay_threads.
-
#jobs_path ⇒ Object
Returns the value of attribute jobs_path.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#perform_threads ⇒ Object
Returns the value of attribute perform_threads.
-
#priorities ⇒ Object
Returns the value of attribute priorities.
-
#queue_threads ⇒ Object
Returns the value of attribute queue_threads.
-
#redis_pool ⇒ Object
Returns the value of attribute redis_pool.
-
#redis_url ⇒ Object
Returns the value of attribute redis_url.
-
#workers ⇒ Object
Returns the value of attribute workers.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #manager_options ⇒ Object
- #redis ⇒ Object
- #worker_options ⇒ Object
Constructor Details
Instance Attribute Details
#database_pool ⇒ Object
Returns the value of attribute database_pool.
33 34 35 |
# File 'lib/qpush/config.rb', line 33 def database_pool @database_pool end |
#database_url ⇒ Object
Returns the value of attribute database_url.
33 34 35 |
# File 'lib/qpush/config.rb', line 33 def database_url @database_url end |
#delay_threads ⇒ Object
Returns the value of attribute delay_threads.
33 34 35 |
# File 'lib/qpush/config.rb', line 33 def delay_threads @delay_threads end |
#jobs_path ⇒ Object
Returns the value of attribute jobs_path.
33 34 35 |
# File 'lib/qpush/config.rb', line 33 def jobs_path @jobs_path end |
#namespace ⇒ Object
Returns the value of attribute namespace.
33 34 35 |
# File 'lib/qpush/config.rb', line 33 def namespace @namespace end |
#perform_threads ⇒ Object
Returns the value of attribute perform_threads.
33 34 35 |
# File 'lib/qpush/config.rb', line 33 def perform_threads @perform_threads end |
#priorities ⇒ Object
Returns the value of attribute priorities.
33 34 35 |
# File 'lib/qpush/config.rb', line 33 def priorities @priorities end |
#queue_threads ⇒ Object
Returns the value of attribute queue_threads.
33 34 35 |
# File 'lib/qpush/config.rb', line 33 def queue_threads @queue_threads end |
#redis_pool ⇒ Object
Returns the value of attribute redis_pool.
33 34 35 |
# File 'lib/qpush/config.rb', line 33 def redis_pool @redis_pool end |
#redis_url ⇒ Object
Returns the value of attribute redis_url.
33 34 35 |
# File 'lib/qpush/config.rb', line 33 def redis_url @redis_url end |
#workers ⇒ Object
Returns the value of attribute workers.
33 34 35 |
# File 'lib/qpush/config.rb', line 33 def workers @workers end |
Instance Method Details
#manager_options ⇒ Object
49 50 51 52 53 54 |
# File 'lib/qpush/config.rb', line 49 def { workers: workers, options: } end |
#redis ⇒ Object
56 57 58 59 60 61 |
# File 'lib/qpush/config.rb', line 56 def redis { size: redis_pool, url: redis_url } end |
#worker_options ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/qpush/config.rb', line 41 def { perform_threads: perform_threads, queue_threads: queue_threads, delay_threads: delay_threads } end |