Class: ElasticGraph::IndexerLambda::LambdaFunction
- Inherits:
-
Object
- Object
- ElasticGraph::IndexerLambda::LambdaFunction
- Includes:
- LambdaSupport::LambdaFunction
- Defined in:
- lib/elastic_graph/indexer_lambda/lambda_function.rb
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.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/elastic_graph/indexer_lambda/lambda_function.rb', line 17 def initialize require "elastic_graph/indexer_lambda" require "elastic_graph/indexer_lambda/sqs_processor" indexer = ElasticGraph::IndexerLambda.indexer_from_env @sqs_processor = ElasticGraph::IndexerLambda::SqsProcessor.new( indexer.processor, logger: indexer.logger, report_batch_item_failures: ENV["REPORT_BATCH_ITEM_FAILURES"] == "true" ) end |
Instance Method Details
#handle_request(event:, context:) ⇒ Object
29 30 31 |
# File 'lib/elastic_graph/indexer_lambda/lambda_function.rb', line 29 def handle_request(event:, context:) @sqs_processor.process(event) end |