init redis lazy

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-07-20 20:17:32 +02:00
parent 492141547d
commit f2298a1b05
19 changed files with 134 additions and 86 deletions

View File

@@ -1,7 +1,7 @@
import { mergeDeepRight } from 'ramda';
import { toDots } from '@openpanel/common';
import { redis } from '@openpanel/redis';
import { getRedisCache } from '@openpanel/redis';
import { ch, chQuery } from '../clickhouse-client';
import type {
@@ -22,7 +22,7 @@ import { RedisBuffer } from './buffer';
export class ProfileBuffer extends RedisBuffer<IClickhouseProfile> {
constructor() {
super({
redis,
redis: getRedisCache(),
table: 'profiles',
batchSize: 100,
});