[NOT READY] start change aggregation timeline

This commit is contained in:
Emily
2024-12-06 17:04:29 +01:00
parent 06768b6cdc
commit ad8e9e1ead
10 changed files with 77 additions and 77 deletions

View File

@@ -13,17 +13,12 @@ export default defineEventHandler(async event => {
const cacheExp = 60;
return await Redis.useCacheV2(cacheKey, cacheExp, async () => {
const timelineData = await executeTimelineAggregation({
projectId: project_id,
model: EventModel,
from, to, slice,
});
const timelineFilledMerged = fillAndMergeTimelineAggregationV2(timelineData, slice, from, to);
return timelineFilledMerged;
return timelineData;
});

View File

@@ -18,9 +18,7 @@ export default defineEventHandler(async event => {
model: SessionModel,
from, to, slice,
});
const timelineFilledMerged = fillAndMergeTimelineAggregationV2(timelineData, slice, from, to);
return timelineFilledMerged;
return timelineData;
});

View File

@@ -12,18 +12,14 @@ export default defineEventHandler(async event => {
const cacheKey = `timeline:visits:${pid}:${slice}:${from}:${to}`;
const cacheExp = 60;
return await Redis.useCacheV2(cacheKey, cacheExp, async () => {
return await Redis.useCacheV2(cacheKey, cacheExp, async () => {
const timelineData = await executeTimelineAggregation({
projectId: project_id,
model: VisitModel,
from, to, slice,
from, to, slice
});
const timelineFilledMerged = fillAndMergeTimelineAggregationV2(timelineData, slice, from, to);
return timelineFilledMerged;
});
return timelineData;
});