This commit is contained in:
parent
95ffaeddc8
commit
bbd010c606
@ -36,7 +36,6 @@ fun Application.module(testing: Boolean = false) {
|
||||
connOpts.password = appConfig.property("ktor.mq.password").getString().toCharArray()
|
||||
mqttClient.connect(connOpts)
|
||||
message.qos = 0
|
||||
mqttClient.publish("benchmark/startup", message)
|
||||
}
|
||||
|
||||
environment.monitor.subscribe(ApplicationStopped){
|
||||
@ -53,7 +52,6 @@ fun Application.module(testing: Boolean = false) {
|
||||
when (part) {
|
||||
is PartData.FormItem -> {
|
||||
if (part.name == "description") {
|
||||
println("Sending MQTT Message")
|
||||
val msgObj: MessageObject = gson.fromJson(part.value,MessageObject::class.java)
|
||||
mqttClient.publish("command/${msgObj.device_id}", message)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user