Skip to content

Instantly share code, notes, and snippets.

@matey-jack
Created April 16, 2019 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matey-jack/a4344df7b85da8e2218622e02b68945b to your computer and use it in GitHub Desktop.
Save matey-jack/a4344df7b85da8e2218622e02b68945b to your computer and use it in GitHub Desktop.
fun Project.getElasticMqInstanceByName(name: String) =
elasticmq().instances.getByName(serverName).elasticMqInstance
open class StartElasticMq
@Inject constructor(name: String) {
init {
group = "elasticmq"
description = "Starts the $name ElasticMQ Server Instance, if not running"
}
fun doAction() {
project.getElasticMqInstanceByName(name).start()
}
}
open class StopElasticMq
@Inject constructor(name: String) {
init {
group = "elasticmq"
description = "Stops the $name ElasticMQ Server Instance, if running"
}
fun doAction() {
project.getElasticMqInstanceByName(name).stop()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment