🪢 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
fix: drop unused redis reference in evalService (#8585)
Steffen Schmitz3d3e8967a610
diff --git a/packages/config-eslint/library.js b/packages/config-eslint/library.jsindex 6ef05b6105..72dc89d60d 100644--- a/packages/config-eslint/library.js+++ b/packages/config-eslint/library.js@@ -41,6 +41,14 @@ module.exports = {// https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errorsrules: {"no-undef": "off",+ "no-restricted-globals": [+ "error",+ {+ name: "redis",+ message:+ "Import redis explicitly from '@langfuse/shared/src/server' instead of using global.",+ },+ ],},},],diff --git a/worker/src/features/evaluation/evalService.ts b/worker/src/features/evaluation/evalService.tsindex 92cf37178c..3882ef79bb 100644--- a/worker/src/features/evaluation/evalService.ts+++ b/worker/src/features/evaluation/evalService.ts@@ -747,31 +747,29 @@ export const evaluate = async ({},]);- if (redis) {- const shardingKey = `${event.projectId}-${scoreId}`;- const queue = IngestionQueue.getInstance({ shardingKey });- if (!queue) {- throw new Error("Ingestion queue not available");- }- await queue.add(QueueJobs.IngestionJob, {- id: randomUUID(),- timestamp: new Date(),- name: QueueJobs.IngestionJob as const,- payload: {- data: {- type: eventTypes.SCORE_CREATE,- eventBodyId: scoreId,- fileKey: eventId,- },- authCheck: {- validKey: true,- scope: {- projectId: event.projectId,- },+ const shardingKey = `${event.projectId}-${scoreId}`;+ const queue = IngestionQueue.getInstance({ shardingKey });+ if (!queue) {+ throw new Error("Ingestion queue not available");+ }+ await queue.add(QueueJobs.IngestionJob, {+ id: randomUUID(),+ timestamp: new Date(),+ name: QueueJobs.IngestionJob as const,+ payload: {+ data: {+ type: eventTypes.SCORE_CREATE,+ eventBodyId: scoreId,+ fileKey: eventId,+ },+ authCheck: {+ validKey: true,+ scope: {+ projectId: event.projectId,},},- });- }+ },+ });} catch (e) {logger.error(`Failed to add score into IngestionQueue: ${e}`, e);traceException(e);