in dev/src/main/scala/com/gu/anghammarad/Main.scala [38:54]
def sendNotificationUsingClient(notification: Notification, topicArn: String): Unit = {
val logger: Logger = LoggerFactory.getLogger(this.getClass)
val sendNotice = Anghammarad.notify(notification, topicArn)
sendNotice onComplete {
case Success(messageId) =>
logger.info(s"sent notification to ${topicArn}, got id: ${messageId}")
case Failure(err) =>
logger.error("Failed to send notification", err)
}
Await.ready(
sendNotice,
Duration("5 seconds")
)
}