mirror of
https://gitlab.silvrtree.co.uk/martind2000/mdot_server.git
synced 2025-01-11 02:55:07 +00:00
aws server sql backup
This commit is contained in:
parent
ef22636be6
commit
33730b4311
@ -44,14 +44,14 @@ var mdot = require('./lib/mdot/mdot.js');
|
||||
};
|
||||
|
||||
|
||||
var device = 3;
|
||||
var device = 13;
|
||||
var ids = ['CENSIS-LoRa-1','CENSIS-LoRa-2','CENSIS-LoRa-3','CENSIS-LoRa-4','HIE-mobile-1','HIE-demo','HIE-mobile-2','HIE-smart-campus-1','HIE-smart-campus-2','HIE-smart-campus-3','HIE-smart-campus-4','HIE-smart-campus-5','HIE-smart-campus-6','HIE-smart-campus-7','HIE-mDot-1'];
|
||||
var data = {id: ids[device]};
|
||||
|
||||
var startTs = Sugar.Date.create('2016-08-19 14:46:48');
|
||||
var endTs = Sugar.Date.create('2016-08-21 10:03:39');
|
||||
logger.debug(startTs, endTs);
|
||||
logger.debug(startTs.getTime(), endTs.getTime());
|
||||
// logger.debug(startTs, endTs);
|
||||
// logger.debug(startTs.getTime(), endTs.getTime());
|
||||
|
||||
data.start = startTs.getTime();
|
||||
data.end = endTs.getTime();
|
||||
@ -64,7 +64,7 @@ var mdot = require('./lib/mdot/mdot.js');
|
||||
for (var item in d.events) {
|
||||
var newItem = d.events[item].evt;
|
||||
newItem.topic=['','','','',ids[device]].join('/');
|
||||
logger.debug(newItem);
|
||||
// logger.debug(newItem);
|
||||
var gwTime = new Date(newItem.gateway_info['0'].gw_time);
|
||||
if ((gwTime > startTs) && (gwTime < endTs)) {
|
||||
doInsertEntry(newItem);
|
||||
|
Loading…
Reference in New Issue
Block a user