feature(dashboard): refactor overview

fix(lint)
This commit is contained in:
Carl-Gerhard Lindesvärd
2025-03-20 09:28:54 +01:00
committed by Carl-Gerhard Lindesvärd
parent b035c0d586
commit a1eb4a296f
83 changed files with 59167 additions and 32403 deletions

View File

@@ -26,6 +26,9 @@ export async function deleteProjects() {
await ch.command({
query: `DELETE FROM ${TABLE_NAMES.events} WHERE project_id IN (${projects.map((project) => escape(project.id)).join(',')});`,
clickhouse_settings: {
lightweight_deletes_sync: 0,
},
});
logger.info(`Deleted ${projects.length} projects`, {

View File

@@ -1,6 +1,6 @@
import type { Job } from 'bullmq';
import { eventBuffer, profileBuffer } from '@openpanel/db';
import { eventBuffer, profileBuffer, sessionBuffer } from '@openpanel/db';
import type { CronQueuePayload } from '@openpanel/queue';
import { deleteProjects } from './cron.delete-projects';
@@ -18,6 +18,9 @@ export async function cronJob(job: Job<CronQueuePayload>) {
case 'flushProfiles': {
return await profileBuffer.tryFlush();
}
case 'flushSessions': {
return await sessionBuffer.tryFlush();
}
case 'ping': {
return await ping();
}