From af7d8f7b6a9c61dd809e8891ee54062f3085ad81 Mon Sep 17 00:00:00 2001 From: Henry Fontanier Date: Wed, 18 Dec 2024 15:57:40 +0100 Subject: [PATCH] enh(tracker): reduce gdrive debounce and run upsert hooks in dev (#9500) Co-authored-by: Henry Fontanier --- front/lib/document_upsert_hooks/hooks/index.ts | 3 ++- front/temporal/tracker/workflows.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/front/lib/document_upsert_hooks/hooks/index.ts b/front/lib/document_upsert_hooks/hooks/index.ts index 9cd6d4e52c9b..d366415c845f 100644 --- a/front/lib/document_upsert_hooks/hooks/index.ts +++ b/front/lib/document_upsert_hooks/hooks/index.ts @@ -1,4 +1,5 @@ import type { ConnectorProvider, UpsertContext } from "@dust-tt/types"; +import { isDevelopment } from "@dust-tt/types"; import type { Authenticator } from "@app/lib/auth"; import { trackerUpsertHook } from "@app/lib/document_upsert_hooks/hooks/tracker"; @@ -30,7 +31,7 @@ export function runDocumentUpsertHooks( params: Parameters[0] ): void { // TODO(document-tracker): remove this once we have a way to enable/disable - if (params.auth.workspace()?.sId !== DUST_WORKSPACE) { + if (params.auth.workspace()?.sId !== DUST_WORKSPACE && !isDevelopment()) { return; } diff --git a/front/temporal/tracker/workflows.ts b/front/temporal/tracker/workflows.ts index 3b22ca119524..bb336f01aaf5 100644 --- a/front/temporal/tracker/workflows.ts +++ b/front/temporal/tracker/workflows.ts @@ -41,7 +41,7 @@ export async function trackersGenerationWorkflow( if (!dataSourceConnectorProvider) { return 10000; } - if (dataSourceConnectorProvider === "notion") { + if (["notion", "google_drive"].includes(dataSourceConnectorProvider)) { return 600000; } return 3600000;