Class: EXEL::Processors::AsyncProcessor
- Inherits:
-
Object
- Object
- EXEL::Processors::AsyncProcessor
- Includes:
- EXEL::ProcessorHelper
- Defined in:
- lib/exel/processors/async_processor.rb
Instance Attribute Summary collapse
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
-
#initialize(context) ⇒ AsyncProcessor
constructor
A new instance of AsyncProcessor.
- #process(block) ⇒ Object
Methods included from EXEL::ProcessorHelper
#ensure_transaction_duration, #file_size_in_mb, #log, #log_error, #log_exception, #log_info, #log_prefix, #log_prefix_with, #log_process, #log_transaction, #tag, #timestamp
Constructor Details
#initialize(context) ⇒ AsyncProcessor
Returns a new instance of AsyncProcessor.
9 10 11 12 13 14 |
# File 'lib/exel/processors/async_processor.rb', line 9 def initialize(context) @context = context @provider = EXEL.async_provider.new(context) log_prefix_with '[AsyncProcessor]' end |
Instance Attribute Details
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
7 8 9 |
# File 'lib/exel/processors/async_processor.rb', line 7 def provider @provider end |
Instance Method Details
#process(block) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/exel/processors/async_processor.rb', line 16 def process(block) log_process do @provider.do_async(block) log_info 'call to async completed' end end |