From 71ca23b102660fd80c0bf23dff8eab5cc96dbc45 Mon Sep 17 00:00:00 2001
From: git-directory-deploy <>
Date: Thu, 28 Jan 2021 11:09:19 +0100
Subject: [PATCH] publish: use moment for isHistoryLoaded function

generated from commit a041b829112bfe4bd211a5b74338d2170e67f1c3
---
 index.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 5dfc64c..7ac9912 100644
--- a/index.js
+++ b/index.js
@@ -107,7 +107,7 @@ moment.locale('fr') // set the language
 moment.tz.setDefault('Europe/Paris') // set the timezone
 
 /*** Connector Constants ***/
-const manualExecution = process.env.COZY_JOB_MANUAL_EXECUTION
+const manualExecution = false
 const startDailyDate = manualExecution
   ? moment().subtract(12, 'month')
   : moment().subtract(32, 'month')
@@ -136,6 +136,7 @@ const loadCurveURL = `${baseUrl}/v4/metering_data/consumption_load_curve`
 async function start(fields, cozyParameters, doRetry = true) {
   log('info', 'Starting the enedis konnector')
   log('info', `Manual execution: ${manualExecution}`)
+  log('info', `Start_date: ${startDailyDateString}`)
   const accountId = getAccountId()
   let usage_point_id = ''
   try {
-- 
GitLab