Skip to content

Commit

Permalink
Merge pull request #24 from guardian/remove-java-version-assertion
Browse files Browse the repository at this point in the history
Remove java version assertion
  • Loading branch information
emdash-ie authored Sep 5, 2024
2 parents eaf5105 + 69405e7 commit d3941d0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# editors-picks-uploader
AWS Lambda to upload editors picks to the Content API.

# Overview
The editors-picks-uploader is responsible for periodically (every 5 minutes) uploading editors picks to the content API.
It does this by hitting `http://api.nextgen.guardianapps.co.uk/PATH/lite.json` where PATH is a front obtained from the
facia client, taking the top 25 items (regardless of which collection) and sending them to be indexed by CAPI.

# Alarms
If editors picks data is not updating in capi then it's because either:
1. This lambda is not publishing to SNS. There is a cloudwatch alarm created by this stack for alerting when no messages are published for 10mins.
2. Porter is not reading from its SQS queue. There is a cloudwatch alarm in the Porter stack for alerting when messages on the queue are older than 20mins.

In both cases you can check the status of these metrics from the cloudwatch console.

# editors-picks-uploader

AWS Lambda to upload editors picks to the Content API.

## Overview

The editors-picks-uploader is responsible for periodically (every 5 minutes) uploading editors picks to the content API.
It does this by hitting `http://api.nextgen.guardianapps.co.uk/PATH/lite.json` where PATH is a front obtained from the
facia client, taking the top 25 items (regardless of which collection) and sending them to be indexed by CAPI.

## Alarms

If editors picks data is not updating in capi then it's because either:
1. This lambda is not publishing to SNS. There is a cloudwatch alarm created by this stack for alerting when no messages are published for 10mins.
2. Porter is not reading from its SQS queue. There is a cloudwatch alarm in the Porter stack for alerting when messages on the queue are older than 20mins.

In both cases you can check the status of these metrics from the cloudwatch console.

## Dev setup

Note that this app runs on Java 11 – please set your JAVA_HOME accordingly (or use [asdf](https://asdf-vm.com/) or [sdkman](https://sdkman.io/)).
7 changes: 0 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,4 @@ dependencyOverrides ++= Seq(
Universal / topLevelDirectory := None
Universal / packageName := normalizedName.value

initialize := {
val _ = initialize.value
assert(sys.props("java.specification.version") == "11",
"Java 11 is required for this project.")
}


Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-u", sys.env.getOrElse("SBT_JUNIT_OUTPUT", "junit"))

0 comments on commit d3941d0

Please sign in to comment.