Module: Osbourne::Config::SharedConfigs
- Included in:
- Osbourne
- Defined in:
- lib/osbourne/config/shared_configs.rb
Instance Attribute Summary collapse
-
#aws_credentials ⇒ Object
writeonly
Sets the attribute aws_credentials.
- #config ⇒ Object
-
#sns_config ⇒ Object
writeonly
Sets the attribute sns_config.
-
#sqs_config ⇒ Object
writeonly
Sets the attribute sqs_config.
Instance Method Summary collapse
- #cache ⇒ Object
- #dead_letter ⇒ Object
- #lock ⇒ Object
- #logger ⇒ Object
- #max_retry_count ⇒ Object
- #prefix ⇒ Object
- #sleep_time ⇒ Object
- #test_mode! ⇒ Object
- #test_mode=(test_mode) ⇒ Object
- #test_mode? ⇒ Boolean
- #threads_per_worker ⇒ Object
Instance Attribute Details
#aws_credentials=(value) ⇒ Object (writeonly)
Sets the attribute aws_credentials
6 7 8 |
# File 'lib/osbourne/config/shared_configs.rb', line 6 def aws_credentials=(value) @aws_credentials = value end |
#config ⇒ Object
8 9 10 |
# File 'lib/osbourne/config/shared_configs.rb', line 8 def config @config ||= ActiveSupport::OrderedOptions.new end |
#sns_config=(value) ⇒ Object (writeonly)
Sets the attribute sns_config
6 7 8 |
# File 'lib/osbourne/config/shared_configs.rb', line 6 def sns_config=(value) @sns_config = value end |
#sqs_config=(value) ⇒ Object (writeonly)
Sets the attribute sqs_config
6 7 8 |
# File 'lib/osbourne/config/shared_configs.rb', line 6 def sqs_config=(value) @sqs_config = value end |
Instance Method Details
#cache ⇒ Object
12 13 14 |
# File 'lib/osbourne/config/shared_configs.rb', line 12 def cache config.cache ||= ActiveSupport::Cache::NullStore.new end |
#dead_letter ⇒ Object
28 29 30 |
# File 'lib/osbourne/config/shared_configs.rb', line 28 def dead_letter config.dead_letter ||= true end |
#lock ⇒ Object
40 41 42 |
# File 'lib/osbourne/config/shared_configs.rb', line 40 def lock config.lock ||= Osbourne::Locks::NOOP.new end |
#logger ⇒ Object
36 37 38 |
# File 'lib/osbourne/config/shared_configs.rb', line 36 def logger config.logger ||= Logger.new("log/osbourne.log") end |
#max_retry_count ⇒ Object
32 33 34 |
# File 'lib/osbourne/config/shared_configs.rb', line 32 def max_retry_count @max_retry_count ||= (config.max_retry_count.presence || 5).to_s end |
#prefix ⇒ Object
52 53 54 |
# File 'lib/osbourne/config/shared_configs.rb', line 52 def prefix config.prefix ||= Rails.env end |
#sleep_time ⇒ Object
44 45 46 |
# File 'lib/osbourne/config/shared_configs.rb', line 44 def sleep_time config.sleep_time ||= 15 end |
#test_mode! ⇒ Object
20 21 22 |
# File 'lib/osbourne/config/shared_configs.rb', line 20 def test_mode! @test_mode = true end |
#test_mode=(test_mode) ⇒ Object
24 25 26 |
# File 'lib/osbourne/config/shared_configs.rb', line 24 def test_mode=(test_mode) @test_mode = test_mode end |
#test_mode? ⇒ Boolean
16 17 18 |
# File 'lib/osbourne/config/shared_configs.rb', line 16 def test_mode? false end |
#threads_per_worker ⇒ Object
48 49 50 |
# File 'lib/osbourne/config/shared_configs.rb', line 48 def threads_per_worker config.threads_per_worker ||= 5 end |