Module: Lambdakiq::Event
Instance Method Summary collapse
Instance Method Details
#job?(record) ⇒ Boolean
8 9 10 |
# File 'lib/lambdakiq/event.rb', line 8 def job?(record) record.dig('messageAttributes', 'lambdakiq', 'stringValue') == '1' end |
#jobs?(event) ⇒ Boolean
4 5 6 |
# File 'lib/lambdakiq/event.rb', line 4 def jobs?(event) records(event).any? { |r| job?(r) } end |
#records(event) ⇒ Object
12 13 14 |
# File 'lib/lambdakiq/event.rb', line 12 def records(event) event['Records'] || [] end |