diff --git a/pipeline/relation_embedder/relation_embedder/src/main/scala/weco/pipeline/relation_embedder/LambdaMain.scala b/pipeline/relation_embedder/relation_embedder/src/main/scala/weco/pipeline/relation_embedder/LambdaMain.scala index 6237b8d720..34e2a2c0d8 100644 --- a/pipeline/relation_embedder/relation_embedder/src/main/scala/weco/pipeline/relation_embedder/LambdaMain.scala +++ b/pipeline/relation_embedder/relation_embedder/src/main/scala/weco/pipeline/relation_embedder/LambdaMain.scala @@ -5,10 +5,9 @@ import weco.pipeline.relation_embedder.lib._ import scala.concurrent.Future - object LambdaMain - extends LambdaApp[SQSEvent, String, RelationEmbedderConfig] - with RelationEmbedderConfigurable { + extends LambdaApp[SQSEvent, String, RelationEmbedderConfig] + with RelationEmbedderConfigurable { import SQSEventOps._ private lazy val batchProcessor = BatchProcessor(config) @@ -16,6 +15,8 @@ object LambdaMain def processEvent(event: SQSEvent): Future[String] = { info(s"running relation_embedder lambda, got event: $event") - Future.sequence(event.extractBatches.map(batchProcessor(_))).map(_ => "Done") + Future + .sequence(event.extractBatches.map(batchProcessor(_))) + .map(_ => "Done") } } diff --git a/pipeline/relation_embedder/relation_embedder/src/main/scala/weco/pipeline/relation_embedder/lib/LambdaApp.scala b/pipeline/relation_embedder/relation_embedder/src/main/scala/weco/pipeline/relation_embedder/lib/LambdaApp.scala index 2aa872314d..c237a2dc05 100644 --- a/pipeline/relation_embedder/relation_embedder/src/main/scala/weco/pipeline/relation_embedder/lib/LambdaApp.scala +++ b/pipeline/relation_embedder/relation_embedder/src/main/scala/weco/pipeline/relation_embedder/lib/LambdaApp.scala @@ -8,7 +8,7 @@ import scala.concurrent.{Await, ExecutionContext, Future} import scala.concurrent.duration.{DurationInt, FiniteDuration} trait LambdaApp[In, Out, Config <: ApplicationConfig] - extends RequestHandler[In, Out] + extends RequestHandler[In, Out] with LambdaConfigurable[Config] with Logging { @@ -23,9 +23,9 @@ trait LambdaApp[In, Out, Config <: ApplicationConfig] def processEvent(in: In): Future[Out] override def handleRequest( - event: In, - context: Context - ): Out = Await.result( + event: In, + context: Context + ): Out = Await.result( processEvent(event), maximumExecutionTime )