config option to disable database access, abstraction of alarm mail sending

This commit is contained in:
Wolfgang Hottgenroth
2017-08-28 10:27:21 +02:00
parent 5dc3259a31
commit 9356a81fd1
4 changed files with 36 additions and 27 deletions

View File

@ -24,9 +24,10 @@ let missingeventdetector : MissingEventDetector.MissingEventDetector =
new MissingEventDetector.MissingEventDetector()
dispatcher.register(ESP_THERM_TOPIC, 'MissingEventDetector', missingeventdetector)
let mongo : MongoSave.MongoSave = new MongoSave.MongoSave(config.dict.mongoDbUrl)
dispatcher.register(ESP_THERM_TOPIC, 'MongoSave', mongo);
if (! config.dict.disableDatabaseAccess) {
let mongo : MongoSave.MongoSave = new MongoSave.MongoSave(config.dict.mongoDbUrl)
dispatcher.register(ESP_THERM_TOPIC, 'MongoSave', mongo);
}
dispatcher.exec()
log.info("Dispatcher running")