Created
April 16, 2019 08:02
-
-
Save matey-jack/a4344df7b85da8e2218622e02b68945b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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