Merge pull request #274 from Roost/master
Fixed an issue where API dates were not correctly being triggered. #273
This commit is contained in:
commit
622a23959b
1 changed files with 4 additions and 1 deletions
|
@ -98,7 +98,10 @@ module.exports.getQuery = (id, callback) => {
|
|||
}
|
||||
|
||||
let limit = 300;
|
||||
let treshold = 3600 * 6; // time..NOW..time+6h, 6 hour window after trigger target to detect it
|
||||
|
||||
// time..NOW..time + 24h, 24 hour window after trigger target to detect it
|
||||
//We need a 24 hour window for triggers as the format for dates added via the API are stored as 00:00:00
|
||||
let treshold = 3600 * 24;
|
||||
|
||||
let intervalQuery = (column, seconds, treshold) => column + ' <= NOW() - INTERVAL ' + seconds + ' SECOND AND ' + column + ' >= NOW() - INTERVAL ' + (treshold + seconds) + ' SECOND';
|
||||
|
||||
|
|
Loading…
Reference in a new issue