Class: ElasticGraph::IndexerLambda::LambdaFunction
- Inherits:
-
Object
- Object
- ElasticGraph::IndexerLambda::LambdaFunction
- Includes:
- LambdaSupport::LambdaFunction
- Defined in:
- lib/elastic_graph/indexer_lambda/lambda_function.rb
Instance Attribute Summary collapse
-
#sqs_processor ⇒ Object
readonly
Returns the value of attribute sqs_processor.
Instance Method Summary collapse
- #handle_request(event:, context:) ⇒ Object
-
#initialize ⇒ LambdaFunction
constructor
A new instance of LambdaFunction.
Constructor Details
#initialize ⇒ LambdaFunction
Returns a new instance of LambdaFunction.
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/elastic_graph/indexer_lambda/lambda_function.rb', line 21 def initialize require "elastic_graph/indexer_lambda" require "elastic_graph/indexer_lambda/sqs_processor" indexer = ElasticGraph::IndexerLambda.indexer_from_env = ::JSON.parse(ENV.fetch("IGNORE_SQS_LATENCY_TIMESTAMPS_FROM_ARNS", "[]")).to_set @sqs_processor = ElasticGraph::IndexerLambda::SqsProcessor.new( indexer.processor, ignore_sqs_latency_timestamps_from_arns: , logger: indexer.logger ) end |
Instance Attribute Details
#sqs_processor ⇒ Object (readonly)
Returns the value of attribute sqs_processor.
19 20 21 |
# File 'lib/elastic_graph/indexer_lambda/lambda_function.rb', line 19 def sqs_processor @sqs_processor end |
Instance Method Details
#handle_request(event:, context:) ⇒ Object
35 36 37 |
# File 'lib/elastic_graph/indexer_lambda/lambda_function.rb', line 35 def handle_request(event:, context:) @sqs_processor.process(event) end |