From 98462f8a7d6e2fef8fa01fb067cecb80414af376 Mon Sep 17 00:00:00 2001 From: git-directory-deploy <> Date: Fri, 12 Feb 2021 11:25:22 +0100 Subject: [PATCH] publish: Update version to 0.1.3 generated from commit 1426dcd92938fc3a480877026c135b4c13866ce3 --- index.js | 16 +++++++++++----- package.json | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 84a1ffb..ccb5635 100644 --- a/index.js +++ b/index.js @@ -190,19 +190,19 @@ async function start(fields, cozyParameters) { } async function processData(timeStep, response, baseUrl, apiAuthKey) { const doctype = rangeDate[timeStep].doctype - log('info', 'Getting data') + log('debug', 'Getting data') const loadProfile = await getData(response, baseUrl, apiAuthKey) - log('info', 'Saving data to Cozy') + log('debug', 'Saving data to Cozy') if (doctype === rangeDate.day.doctype) { - log('info', 'Saving daily data') + log('debug', 'Saving daily data') await storeData(loadProfile, rangeDate.day.doctype, rangeDate.day.keys) } else if (doctype === rangeDate.month.doctype) { - log('info', 'Saving monthly data') + log('debug', 'Saving monthly data') await resetInProgressAggregatedData(rangeDate.month.doctype) const monthlyData = processMonthlyAggregation(loadProfile, rangeDate.month) await storeData(monthlyData, rangeDate.month.doctype, rangeDate.month.keys) } else if (doctype === rangeDate.year.doctype) { - log('info', 'Saving yearly data') + log('debug', 'Saving yearly data') await resetInProgressAggregatedData(rangeDate.year.doctype) const yearlyData = processYearAggregation( loadProfile, @@ -239,6 +239,7 @@ async function authenticate(login, password, baseUrl, apiAuthKey) { async function getData(response, baseUrl, apiAuthKey) { log('debug', startDate, 'Start date') log('debug', endDate, 'End date') + // Todo log TypeAgregat to count "A" data for Anomaly const dataRequest = { method: 'POST', uri: baseUrl + '/getAllAgregatsByAbonnement.aspx', @@ -284,6 +285,8 @@ function format(response) { type: value.TypeAgregat } }) + // Todo log response + log('debug', 'FORMAT RESPONS : ' + data) return data } @@ -319,6 +322,9 @@ function groupBy(xs, key) { } function reduceYearFunction(acc, x) { + // Log entering params to know whats going on + log('debug', 'REDUCE_YEAR_FUNCTION_ACC : ' + acc) + log('debug', 'REDUCE_YEAR_FUNCTION_X : ' + x) var id = acc[x.year] if (id) { id.load += x.load diff --git a/package.json b/package.json index 4ec1206..9171513 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "build": "webpack", "lint": "eslint --fix .", "deploy": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build} --repo=${DEPLOY_REPOSITORY:-https://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git}", + "deploy-dev": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build-dev} --repo=${DEPLOY_REPOSITORY:-https://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git}", "cozyPublish": "cozy-app-publish --token $REGISTRY_TOKEN --build-commit $(git rev-parse ${DEPLOY_BRANCH:-build})", "travisDeployKey": "./bin/generate_travis_deploy_key" }, -- GitLab