async-persistence
Library to provide persistence to DynamoDB to support asynchronous functions from play-async
Prerequisits
- SBT
- Install AWS CLI
- AWS installation instructions
- Mac users with brew run
brew install awscli
- Mac users with brew run
- Configure AWS CLI
- Once the CLI is installed run
aws config
and if you don't have an AWS account just put any values in when prompted
- Once the CLI is installed run
- AWS installation instructions
DynamoDB
See script configure_dynamodb.sh
which is used to create the asyncTaskCache
table.
If running tests within an IDE the DynamoDB will need to be manually started as the SBT task will not be invoked. The easiest way to do this is from the sbt
shell startDynamodbLocal
. Don't forget that you will need to stop it manually too, stopDynamodbLocal
.
For more information on the DynamoDB SBT plugin please see sbt-dynamodb
Installing
Include the following dependency in your SBT build
- Release candidate versions
resolvers += Resolver.bintrayRepo("equalexperts", "open-source-release-candidates")
libraryDependencies += "com.equalexperts" %% "async-persistence" % "[INSERT-VERSION]"
- Released versions
TBC
resolvers += Resolver.bintrayRepo("equalexperts", "open-source")
libraryDependencies += "com.equalexperts" %% "async-persistence" % "[INSERT-VERSION]"
Building with Docker
To do this you will need to install Docker
docker build -t async-persistence:latest .
Publishing with Docker
docker run -v ~/.ivy2:/root/.ivy2 -t async-persistence:latest
Contributors
This based off a forked from /hmrc/microservice-async
License
This code is open source software licensed under the Apache 2.0 License.