Top Level Namespace

Includes:
Simplerubysteps

Defined Under Namespace

Modules: Simplerubysteps Classes: QueueClient

Constant Summary

Constants included from Simplerubysteps

Simplerubysteps::CLOUDFORMATION_ERB_TEMPLATE, Simplerubysteps::VERSION

Instance Method Summary collapse

Methods included from Simplerubysteps

#action, #branch, #callback, #choice, cloudformation_yaml, #default, #default_transition_to, #error_catch, #error_retry, #iam_permissions, #kind, #parallel, #pop_function_arn, #pop_function_name, #seconds, #sqs_callback, #string_matches, #task, #task_timeout, #transition, #transition_to, #wait

Instance Method Details

#handler(event:, context:) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/function.rb', line 27

def handler(event:, context:)
  puts ENV.inspect if ENV["DEBUG"]
  puts event if ENV["DEBUG"]
  puts context.inspect if ENV["DEBUG"]

  if event["Token"]
    unless $queue_client
      $sm.deep_states[ENV["task"].to_sym].perform_action event["Input"], event["Token"]
    else
      $sm.deep_states[ENV["task"].to_sym].perform_queue_action event["Input"], event["Token"], $queue_client
    end
  else
    $sm.deep_states[ENV["task"].to_sym].perform_action event["Input"]
  end
end