Class: RailsTransactionalOutbox::Configuration
- Inherits:
-
Object
- Object
- RailsTransactionalOutbox::Configuration
- Defined in:
- lib/rails_transactional_outbox/configuration.rb
Instance Attribute Summary collapse
-
#database_connection_provider ⇒ Object
Returns the value of attribute database_connection_provider.
-
#datadog_statsd_client ⇒ Object
Returns the value of attribute datadog_statsd_client.
- #error_handler ⇒ Object
- #high_priority_sidekiq_queue ⇒ Object
- #lock_client ⇒ Object
- #lock_expiry_time ⇒ Object
-
#logger ⇒ Object
Returns the value of attribute logger.
- #outbox_batch_size ⇒ Object
- #outbox_entries_processor ⇒ Object
- #outbox_entry_causality_key_resolver ⇒ Object
-
#outbox_model ⇒ Object
Returns the value of attribute outbox_model.
- #raise_not_found_model_error ⇒ Object (also: #raise_not_found_model_error?)
-
#transaction_provider ⇒ Object
Returns the value of attribute transaction_provider.
- #transactional_outbox_worker_idle_delay_multiplier ⇒ Object
- #transactional_outbox_worker_sleep_seconds ⇒ Object
- #unprocessed_causality_keys_limit ⇒ Object
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#database_connection_provider ⇒ Object
Returns the value of attribute database_connection_provider.
5 6 7 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 5 def database_connection_provider @database_connection_provider end |
#datadog_statsd_client ⇒ Object
Returns the value of attribute datadog_statsd_client.
5 6 7 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 5 def datadog_statsd_client @datadog_statsd_client end |
#error_handler ⇒ Object
15 16 17 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 15 def error_handler @error_handler || RailsTransactionalOutbox::ErrorHandlers::NullErrorHandler end |
#high_priority_sidekiq_queue ⇒ Object
69 70 71 72 73 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 69 def high_priority_sidekiq_queue return @high_priority_sidekiq_queue if defined?(@high_priority_sidekiq_queue) self.class.high_priority_sidekiq_queue end |
#lock_client ⇒ Object
51 52 53 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 51 def lock_client @lock_client || RailsTransactionalOutbox::NullLockClient end |
#lock_expiry_time ⇒ Object
55 56 57 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 55 def lock_expiry_time @lock_expiry_time || 10_000 end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 5 def logger @logger end |
#outbox_batch_size ⇒ Object
27 28 29 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 27 def outbox_batch_size @outbox_batch_size || 100 end |
#outbox_entries_processor ⇒ Object
39 40 41 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 39 def outbox_entries_processor @outbox_entries_processor ||= RailsTransactionalOutbox::OutboxEntriesProcessors::NonOrderedProcessor.new end |
#outbox_entry_causality_key_resolver ⇒ Object
59 60 61 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 59 def outbox_entry_causality_key_resolver @outbox_entry_causality_key_resolver || ->(_model) {} end |
#outbox_model ⇒ Object
Returns the value of attribute outbox_model.
5 6 7 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 5 def outbox_model @outbox_model end |
#raise_not_found_model_error ⇒ Object Also known as: raise_not_found_model_error?
43 44 45 46 47 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 43 def raise_not_found_model_error return @raise_not_found_model_error if defined?(@raise_not_found_model_error) true end |
#transaction_provider ⇒ Object
Returns the value of attribute transaction_provider.
5 6 7 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 5 def transaction_provider @transaction_provider end |
#transactional_outbox_worker_idle_delay_multiplier ⇒ Object
23 24 25 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 23 def transactional_outbox_worker_idle_delay_multiplier @transactional_outbox_worker_idle_delay_multiplier || 10 end |
#transactional_outbox_worker_sleep_seconds ⇒ Object
19 20 21 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 19 def transactional_outbox_worker_sleep_seconds @transactional_outbox_worker_sleep_seconds || 0.5 end |
#unprocessed_causality_keys_limit ⇒ Object
63 64 65 66 67 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 63 def unprocessed_causality_keys_limit return @unprocessed_causality_keys_limit.to_i if defined?(@unprocessed_causality_keys_limit) 10_000 end |
Class Method Details
.high_priority_sidekiq_queue ⇒ Object
11 12 13 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 11 def self.high_priority_sidekiq_queue :rails_transactional_outbox_high_priority end |
Instance Method Details
#add_record_processor(record_processor) ⇒ Object
35 36 37 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 35 def add_record_processor(record_processor) record_processors << record_processor end |
#record_processors ⇒ Object
31 32 33 |
# File 'lib/rails_transactional_outbox/configuration.rb', line 31 def record_processors @record_processors ||= [RailsTransactionalOutbox::RecordProcessors::ActiveRecordProcessor.new] end |