mirror of
https://gitlab.silvrtree.co.uk/martind2000/mqttArchiver.git
synced 2025-03-13 07:30:01 +00:00
Turned off pushover alerts
This commit is contained in:
parent
c480b6b791
commit
df2618ccec
@ -11,14 +11,6 @@ var requestify = require('requestify');
|
||||
var db = require('../server/db-connector').dbConnection;
|
||||
|
||||
var dbSave = require('../server/db-save')(db);
|
||||
var pusher = require('../pusher');
|
||||
|
||||
//var nano = require('nano')('http://martind2000:1V3D4m526i@localhost:5984');
|
||||
/*
|
||||
var nano = require('nano')('http://localhost:5984');
|
||||
var db_name = 'mqttarchive';
|
||||
var dbCouch = nano.use(db_name);
|
||||
*/
|
||||
|
||||
//let remoteHost = process.env.NODE_ENV === 'production' ? 'http://mdotserver.mybluemix.net/apiv2/message' : 'http://localhost:3011/apiv2/message';
|
||||
const remoteHost = process.env.NODE_ENV === 'production' ? 'http://ec2-52-211-111-57.eu-west-1.compute.amazonaws.com/apiv2/message' : 'http://localhost:3011/apiv2/message';
|
||||
@ -95,8 +87,7 @@ var watchDogTimeout = () => {
|
||||
'Watchdog timeout. Message has not been received for over 20 minutes.');
|
||||
logger.warn('Last received:' + lastReceived + 'Now:' + now);
|
||||
|
||||
pusher.push(
|
||||
'Watchdog timeout. Message has not been received for over 20 Minutes. \n\nLast received:' + lastReceived + 'Now:' + now);
|
||||
|
||||
wdTimedOut = true;
|
||||
};
|
||||
|
||||
@ -131,7 +122,6 @@ var mqttClient = function() {
|
||||
// connected = true;
|
||||
logger.info('Connected to ', address);
|
||||
|
||||
pusher.push('Connected to ' + address);
|
||||
clearTimeout(watchDog);
|
||||
watchDog = setTimeout(watchDogTimeout, 1200000);
|
||||
lastReceived = new Date();
|
||||
@ -188,7 +178,7 @@ var mqttClient = function() {
|
||||
var now = new Date();
|
||||
var s = 'Receiving again :::\n\nLast received: ' + lastReceived + 'Now: ' + now + "\n\n" + message.toString();
|
||||
logger.warn(s);
|
||||
pusher.push(s);
|
||||
|
||||
wdTimedOut = false;
|
||||
}
|
||||
lastReceived = new Date();
|
||||
@ -205,7 +195,7 @@ var mqttClient = function() {
|
||||
this.getCount = function() {
|
||||
'use strict';
|
||||
return count;
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user