diff --git a/src/recoup/fetchTask.ts b/src/recoup/fetchTask.ts index 4799da5..3a0a639 100644 --- a/src/recoup/fetchTask.ts +++ b/src/recoup/fetchTask.ts @@ -2,6 +2,7 @@ import { logger } from "@trigger.dev/sdk/v3"; import { z } from "zod"; import { NEW_API_BASE_URL } from "../consts"; import { type ChatConfig } from "../schemas/chatSchema"; +import { logStep } from "../sandboxes/logStep"; // Zod schema for validating task response from Recoup Tasks API const taskResponseSchema = z.object({ @@ -74,6 +75,11 @@ export async function fetchTask( return undefined; } + if (task.enabled === false) { + logStep("Task is disabled, skipping", false, { externalId }); + return undefined; + } + // Map task data to task config format return { prompt: task.prompt,