Browse Source

Improve timerange logging (#232)

pull/1/head
Evgeny Smyshlyaev 6 years ago committed by rozetko
parent
commit
826c39c749
  1. 4
      server/src/controllers/analytics_controller.ts

4
server/src/controllers/analytics_controller.ts

@ -108,7 +108,7 @@ export async function runLearning(id: AnalyticUnit.AnalyticUnitId) {
let segmentObjs = segments.map(s => s.toObject());
let { from, to } = getQueryRangeForLearningBySegments(segments);
console.debug(`query metrics from ${analyticUnit.panelUrl}`);
console.debug(`query time range: from ${new Date(from)} to ${new Date(to)}`);
let queryResult = await queryByMetric(analyticUnit.metric, analyticUnit.panelUrl, from, to, HASTIC_API_KEY);
let data = queryResult.values;
if(data.length === 0) {
@ -158,7 +158,7 @@ export async function runPredict(id: AnalyticUnit.AnalyticUnitId) {
}
let { from, to } = getQueryRangeForLearningBySegments(segments);
console.debug(`query metrics from ${unit.panelUrl}`);
console.debug(`query time range: from ${new Date(from)} to ${new Date(to)}`);
let queryResult = await queryByMetric(unit.metric, unit.panelUrl, from, to, HASTIC_API_KEY);
let data = queryResult.values;
if(data.length === 0) {

Loading…
Cancel
Save