Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: make BatchProjectCleaner start conditional for events table (#11480)

Valery Meleshkina8047b629bfe
diff --git a/worker/src/app.ts b/worker/src/app.ts
index 3771a9b7b1..1413035318 100644
--- a/worker/src/app.ts
+++ b/worker/src/app.ts
@@ -549,6 +549,13 @@ export const batchProjectCleaners: BatchProjectCleaner[] = [];
if (env.LANGFUSE_BATCH_PROJECT_CLEANER_ENABLED === "true") {
for (const table of BATCH_DELETION_TABLES) {
+ // Only start the events table cleaner if the events table experiment is enabled
+ if (
+ table === "events" &&
+ env.LANGFUSE_EXPERIMENT_INSERT_INTO_EVENTS_TABLE !== "true"
+ ) {
+ continue;
+ }
const cleaner = new BatchProjectCleaner(table);
batchProjectCleaners.push(cleaner);
cleaner.start();