OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
revert
Carl-Gerhard Lindesvärde21cd7ed73c7
diff --git a/packages/db/src/buffers/profile-buffer.ts b/packages/db/src/buffers/profile-buffer.tsindex a7973069b..da33e596d 100644--- a/packages/db/src/buffers/profile-buffer.ts+++ b/packages/db/src/buffers/profile-buffer.ts@@ -4,12 +4,7 @@ import { toDots } from '@openpanel/common';import { getRedisCache } from '@openpanel/redis';import { escape } from 'sqlstring';-import {- TABLE_NAMES,- ch,- chQuery,- formatClickhouseDate,-} from '../clickhouse-client';+import { TABLE_NAMES, ch, chQuery } from '../clickhouse-client';import { transformProfile } from '../services/profile.service';import type {IClickhouseProfile,@@ -28,15 +23,6 @@ export class ProfileBuffer extends RedisBuffer<BufferType> {super(TABLE_NAMES.profiles, BATCH_SIZE);}- protected transformProfiles(profiles: IClickhouseProfile[]): BufferType[] {- return profiles.map((profile) => ({- ...profile,- created_at: profile.created_at- ? formatClickhouseDate(profile.created_at)- : '',- }));- }-// this will do a couple of things:// - we slice the queue to maxBufferSize since this queries have a limit on character count// - check redis cache for profiles@@ -54,14 +40,12 @@ export class ProfileBuffer extends RedisBuffer<BufferType> {slicedQueue.filter((_, index) => !redisProfiles[index]),);- const profiles = this.createProfileValues(+ const toInsert = this.createProfileValues(slicedQueue,redisProfiles,dbProfiles,);- const toInsert = this.transformProfiles(profiles);-if (toInsert.length > 0) {await this.updateRedisCache(toInsert);}