Commit 65959248 authored by git-directory-deploy's avatar git-directory-deploy
Browse files

publish: fix

generated from commit 460ffc31
parent 764a981d
......@@ -6572,7 +6572,7 @@ class ConsumptionDataManager {
month: 'asc'
}]).limitBy(1);
const data = await this._client.query(query);
return data.data[0];
return data.data;
}
/**
* Save one doc
<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="theme-color" content="#ffffff"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover">{{.ThemeCSS}} {{.CozyBar}}</head><body><div role="application" class="application" data-cozy-token="{{.Token}}" data-cozy-domain="{{.Domain}}" data-cozy-locale="{{.Locale}}" data-cozy-app-name="{{.AppName}}" data-cozy-app-slug="{{.AppSlug}}" data-cozy-app-name-prefix="{{.AppNamePrefix}}" data-cozy-app-editor="{{.AppEditor}}" data-cozy-icon-path="{{.IconPath}}"><script src="vendors/ecolyo.93a14a4e20529d5cb99e.js"></script><script src="app/ecolyo.58a7b36e6d72e686933b.js"></script></div></body></html>
\ No newline at end of file
<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="theme-color" content="#ffffff"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover">{{.ThemeCSS}} {{.CozyBar}}</head><body><div role="application" class="application" data-cozy-token="{{.Token}}" data-cozy-domain="{{.Domain}}" data-cozy-locale="{{.Locale}}" data-cozy-app-name="{{.AppName}}" data-cozy-app-slug="{{.AppSlug}}" data-cozy-app-name-prefix="{{.AppNamePrefix}}" data-cozy-app-editor="{{.AppEditor}}" data-cozy-icon-path="{{.IconPath}}"><script src="vendors/ecolyo.93a14a4e20529d5cb99e.js"></script><script src="app/ecolyo.0c23550f2cfbe3b5ae25.js"></script></div></body></html>
\ No newline at end of file
......@@ -74367,7 +74367,7 @@ class ConsumptionDataManager {
month: 'asc'
}]).limitBy(1);
const data = await this._client.query(query);
return data.data[0];
return data.data;
}
/**
* Save one doc
......@@ -73218,7 +73218,7 @@ class ConsumptionDataManager {
month: 'asc'
}]).limitBy(1);
const data = await this._client.query(query);
return data.data[0];
return data.data;
}
/**
* Save one doc
......@@ -73103,7 +73103,7 @@ class ConsumptionDataManager {
month: 'asc'
}]).limitBy(1);
const data = await this._client.query(query);
return data.data[0];
return data.data;
}
/**
* Save one doc
......@@ -73103,7 +73103,7 @@ class ConsumptionDataManager {
month: 'asc'
}]).limitBy(1);
const data = await this._client.query(query);
return data.data[0];
return data.data;
}
/**
* Save one doc
......@@ -75737,12 +75737,12 @@ const applyPrices = async (client, fluidType) => {
log('debug', 'fluidPrices data found');
const firstMinuteData = await cdm.getFirstDataDateFromDoctypeWithPrice(getDoctypeTypeByFluid(fluidType)); // If there is data, update hourly data and daily data
 
if (firstMinuteData) {
if (firstMinuteData && firstMinuteData.length > 0) {
// Format first date
const firstDate = _luxon.DateTime.fromObject({
year: firstMinuteData.year,
month: firstMinuteData.month,
day: firstMinuteData.day
year: firstMinuteData[0].year,
month: firstMinuteData[0].month,
day: firstMinuteData[0].day
});
 
const today = _luxon.DateTime.now();
......@@ -75757,8 +75757,11 @@ const applyPrices = async (client, fluidType) => {
 
do {
// Get price
const priceData = await fluidsPricesService.getPrices(fluidType, date);
log('debug', `Step: ${timeStep} | Fluid : ${fluidType} | Date: ${date.day}/${date.month}/${date.year} | Price: ${priceData.price}`);
const priceData = await fluidsPricesService.getPrices(fluidType, date); // log(
// 'debug',
// `Step: ${timeStep} | Fluid : ${fluidType} | Date: ${date.day}/${date.month}/${date.year} | Price: ${priceData.price}`
// )
const tp = await getTimePeriod(timeStep, date); // Get doc to update
 
const data = await qr.fetchFluidRawDoctype(tp, timeStep, fluidType); // If lastItem has a price, skip this day (in order to save perf)
......@@ -75799,10 +75802,11 @@ const processPrices = async ({
client
}) => {
log('info', `Processing electricity data...`);
const elec = await applyPrices(client, _fluid.FluidType.ELECTRICITY);
const elec = applyPrices(client, _fluid.FluidType.ELECTRICITY);
log('info', `Electricity data done`);
log('info', `Processing gas data...`);
const gas = await applyPrices(client, _fluid.FluidType.GAS);
const gas = applyPrices(client, _fluid.FluidType.GAS);
await Promise.all([elec, gas]);
log('info', `Gas data done`);
};
 
......@@ -73218,7 +73218,7 @@ class ConsumptionDataManager {
month: 'asc'
}]).limitBy(1);
const data = await this._client.query(query);
return data.data[0];
return data.data;
}
/**
* Save one doc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment