Class: Itchy::EventHandlers::ExpirePostfixEventHandler
- Inherits:
-
BaseEventHandler
- Object
- BaseEventHandler
- Itchy::EventHandlers::ExpirePostfixEventHandler
- Defined in:
- lib/itchy/event_handlers/expire_postfix_event_handler.rb
Overview
Handler for ExpirePostfix event (image expired).
Constant Summary
Constants inherited from BaseEventHandler
BaseEventHandler::EVENT_FILE_REGEXP, BaseEventHandler::TEMPFILE_BASE
Instance Attribute Summary
Attributes inherited from BaseEventHandler
#options, #vmcatcher_configuration
Instance Method Summary collapse
-
#handle!(vmcatcher_event, event_name) ⇒ Object
Handles an ExpirePostfix event.
Methods inherited from BaseEventHandler
#archive!, #initialize, #save_descriptor, #set_file_permissions
Constructor Details
This class inherits a constructor from Itchy::EventHandlers::BaseEventHandler
Instance Method Details
#handle!(vmcatcher_event, event_name) ⇒ Object
Handles an ExpirePostfix event.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/itchy/event_handlers/expire_postfix_event_handler.rb', line 8 def handle!(vmcatcher_event, event_name) super Itchy::Log.info "[#{self.class.name}] Handling expired image " \ "for #{vmcatcher_event.dc_identifier.inspect}" begin save_descriptor(create_descriptor(vmcatcher_event), event_name) rescue Itchy::Errors::PrepareEnvError => ex Itchy::Log.error "[#{self.cass.name}] Problem with handling event #{event_name}" \ "Event handling failed with #{ex.}" fail Itchy::Errors::EventHandleError, ex end end |