From 8699461eb845eaa11cd331a700e278de12848d85 Mon Sep 17 00:00:00 2001 From: git-directory-deploy <> Date: Wed, 16 Dec 2020 10:42:16 +0100 Subject: [PATCH] publish: feat: add history for load data generated from commit d949ac5d2a18fd86f5c4684a81ff563eb70b43cc --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 2ea2e6e..c0a5e5c 100644 --- a/index.js +++ b/index.js @@ -225,7 +225,7 @@ async function getDailyData(token, usagePointID) { */ async function startLoadDataProcess(token, usagePointID) { log('info', 'Check history') - const isHistory = await isHistoryLoaded('com.grandlyon.enedis.hour') + const isHistory = await isHistoryLoaded('com.grandlyon.enedis.minute') if (isHistory) { log('info', 'launch process without history') await launchLoadDataProcess(token, usagePointID, startLoadDate, endDate) @@ -500,9 +500,11 @@ async function isHistoryLoaded(doctype) { }) if (filtered.length > 0) { return false + } else { + return true } } - return true + return false } /** -- GitLab