From 572bbc5815da833d3a815a65eebd76bd6f4d7981 Mon Sep 17 00:00:00 2001 From: ingalls Date: Thu, 7 Dec 2023 09:06:33 -0700 Subject: [PATCH] Update Filter --- CHANGELOG.md | 4 ++++ task.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eefa613..80f9d15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ ## Version History +### v2.5.0 + +- :rocket: Include 1 hour time cutoff + ### v2.4.2 - :bug: Collection Timestamp fix diff --git a/task.js b/task.js index aac5841..c36ebba 100644 --- a/task.js +++ b/task.js @@ -94,6 +94,8 @@ export default class Task extends ETL { } else { return true; } + }).filter((plow) => { + return moment(Math.floor(plow.avl_location.source.collection_timestamp * 1000)).isAfter(moment().subtract(1, 'hour')); }).map((plow) => { const feat = { id: plow.avl_location.vehicle.id + '_' + plow.avl_location.vehicle.id2,