def processS3Event()

in facia-purger/src/main/scala/com/gu/purge/facia/Lambda.scala [23:34]


  def processS3Event(event: S3Event, config: Config) = {
    val entities: List[S3Entity] = event.getRecords.asScala.map(_.getS3).toList

    log.debug(s"Processing ${entities.size} updated entities ...")

    entities.forall { entity =>
      log.info(s"Debug path log: ${entity.getObject.getKey}")
      new FrontsS3PathParser(stage, entity.getObject.getKey)
        .run()
        .exists(sendPurgeRequest(_, config))
    }
  }