Class: Qurd::Action::Dummy

Inherits:
Qurd::Action show all
Defined in:
lib/qurd/action/dummy.rb

Overview

Example of a sub-classed Qurd::Action

Instance Attribute Summary

Attributes inherited from Qurd::Action

#context, #message

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Qurd::Action

#aws_credentials, #initialize, #inspect, #region, #run_after, #run_before

Methods included from Mixins::Configuration

#qurd_config, #qurd_configuration, #qurd_logger, #qurd_logger!

Methods included from Mixins::AwsClients

#aws_client, #aws_retryable

Constructor Details

This class inherits a constructor from Qurd::Action

Class Method Details

.configure(action) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/qurd/action/dummy.rb', line 6

def self.configure(action)
  case action
  when 'launch' then qurd_logger.debug('launch')
  when 'launch_error' then qurd_logger.debug('launch_error')
  when 'terminate' then qurd_logger.debug('terminate')
  when 'terminate_error' then qurd_logger.debug('terminate_error')
  when 'test' then qurd_logger.debug('test')
  end
end

Instance Method Details

#launchObject Also known as: launch_error, terminate, terminate_error, test



16
17
18
19
20
# File 'lib/qurd/action/dummy.rb', line 16

def launch
  message.context[:dummy] = true
  qurd_logger.debug('Qurd is debugging') if qurd_config.debug?
  qurd_logger.info("Received message #{message.inspect}")
end