Skip to content

Commit

Permalink
Apply auto-formatting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
weco-bot committed Dec 19, 2024
1 parent 055e652 commit cca21a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ 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)

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")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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
)
Expand Down

0 comments on commit cca21a4

Please sign in to comment.