diff --git a/.editorconfig b/.editorconfig index cd230f5bc2fea8028935e4670612c029bc06684d..150979a0a4047259070191eabcb2055ff450cd06 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,7 +5,7 @@ root = true [*] charset = utf-8 -end_of_line = crlf +end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true indent_style = space diff --git a/manifest.konnector b/manifest.konnector index 45b0262f958981d0f00811acd76ab276ac392474..e26d1d5f5e99005e71c97dea70c3171a24e71b9e 100644 --- a/manifest.konnector +++ b/manifest.konnector @@ -11,23 +11,8 @@ "categories": ["energy"], "frequency": "daily", "fields": { - "wso2BaseUrl": { - "type": "hidden" - }, - "loginUtilisateur": { - "type": "hidden" - }, - "apiToken": { - "type": "hidden" - }, - "pdl": { + "pointId": { "type": "text" - }, - "nom": { - "type": "password" - }, - "prenom": { - "type": "password" } }, "data_types": [ diff --git a/src/index.js b/src/index.js index da6036cadbeccc46ea3f7519d2e0d174a30ff363..43ea0823b2a5ab5482b9e9d39869e5ef49b7617f 100644 --- a/src/index.js +++ b/src/index.js @@ -291,6 +291,7 @@ function processData(doctype = 'com.grandlyon.enedis.day') { log('info', 'Agregate enedis daily data for month and year') if (doctype === 'com.grandlyon.enedis.day') { + log('info', 'Agregating...') await agregateMonthAndYearData(processedDailyData) } } @@ -306,8 +307,14 @@ function processStartDate() { throw err } // update start Date with contract openning date - startDailyDate = moment(parseSgeXmlTechnicalData(result), 'YYYY-MM-DD') - startDailyDateString = startDailyDate.format('YYYY-MM-DD') + try { + startDailyDate = moment(parseSgeXmlTechnicalData(result), 'YYYY-MM-DD') + startDailyDateString = startDailyDate.format('YYYY-MM-DD') + } catch (err) { + log('error', err) + //TODO: custom error ? + throw err + } } }