Class: StagedEvent::SubscriberProcess
- Inherits:
-
Object
- Object
- StagedEvent::SubscriberProcess
- Includes:
- Technologic
- Defined in:
- lib/staged_event/subscriber_process.rb
Instance Method Summary collapse
-
#initialize(subscriber) ⇒ SubscriberProcess
constructor
A new instance of SubscriberProcess.
- #run ⇒ Object
Constructor Details
#initialize(subscriber) ⇒ SubscriberProcess
Returns a new instance of SubscriberProcess.
7 8 9 |
# File 'lib/staged_event/subscriber_process.rb', line 7 def initialize(subscriber) @subscriber = subscriber end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/staged_event/subscriber_process.rb', line 11 def run subscriber.receive_events rescue StandardError => exception error :subscriber_main_loop_failed, exception: exception. retry rescue SignalException => exception error :signal_exception, message: exception. end |