Class: ActiveWorker::TerminationEvent
- Inherits:
-
FinishedEvent
- Object
- Event
- FinishedEvent
- ActiveWorker::TerminationEvent
- Defined in:
- lib/active_worker/termination_event.rb
Class Method Summary collapse
- .create_termination_from_configuration(configuration) ⇒ Object
- .from_termination(root_configuration) ⇒ Object
Methods inherited from FinishedEvent
Methods inherited from Event
#event_type, exists_for_configurations?, #fields_for_view, #generate_message, #get_pid, #get_worker_pid, #set_message, #set_process_information
Methods included from Behavior::HasRootObject
#get_root_object_id, included, #notify_root_of_child_started, #notify_root_of_finished, #root_owner, #set_root_object
Class Method Details
.create_termination_from_configuration(configuration) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/active_worker/termination_event.rb', line 12 def self.create_termination_from_configuration(configuration) = { :message => "#{configuration.event_name} was terminated", :configuration => configuration, } create! end |
.from_termination(root_configuration) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/active_worker/termination_event.rb', line 4 def self.from_termination(root_configuration) events = [] root_configuration.configurations_for_events.each do |configuration| events << create_termination_from_configuration(configuration) unless configuration.completed? end events end |