feature(dashboard): refactor overview
fix(lint)
This commit is contained in:
committed by
Carl-Gerhard Lindesvärd
parent
b035c0d586
commit
a1eb4a296f
@@ -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`, {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user