🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
chore: relax BatchDataRetentionCleanerQueue limits to allow for multiple tables processing at the same time (#11746)
Valery Meleshkin5237d4b176fa
diff --git a/worker/src/app.ts b/worker/src/app.tsindex 218df45b23..175d3a3a1e 100644--- a/worker/src/app.ts+++ b/worker/src/app.ts@@ -587,6 +587,12 @@ if (env.LANGFUSE_BATCH_PROJECT_CLEANER_ENABLED === "true") {// Batch data retention cleaners for bulk deletion of expired ClickHouse dataif (env.LANGFUSE_BATCH_DATA_RETENTION_CLEANER_ENABLED === "true") {+ const tables = BATCH_DATA_RETENTION_TABLES.filter(+ (t) =>+ t !== "events" ||+ env.LANGFUSE_EXPERIMENT_INSERT_INTO_EVENTS_TABLE === "true",+ );+WorkerManager.register(QueueName.BatchDataRetentionCleanerQueue,batchDataRetentionCleanerProcessor,@@ -596,7 +602,7 @@ if (env.LANGFUSE_BATCH_DATA_RETENTION_CLEANER_ENABLED === "true") {lockDuration: 60000, // 60 secondsstalledInterval: 120000, // 120 secondslimiter: {- max: 1,+ max: tables.length, // one job per table at a time globallyduration: env.LANGFUSE_BATCH_DATA_RETENTION_CLEANER_INTERVAL_MS, // no more than 1 job at a time globally},},@@ -605,11 +611,6 @@ if (env.LANGFUSE_BATCH_DATA_RETENTION_CLEANER_ENABLED === "true") {// Schedule repeatable jobs for each tableconst dataRetentionQueue = BatchDataRetentionCleanerQueue.getInstance();if (dataRetentionQueue) {- const tables = BATCH_DATA_RETENTION_TABLES.filter(- (t) =>- t !== "events" ||- env.LANGFUSE_EXPERIMENT_INSERT_INTO_EVENTS_TABLE === "true",- );for (const table of tables) {dataRetentionQueue.upsertJobScheduler(