diff --git a/apps/workflows/src/cron/monitor.ts b/apps/workflows/src/cron/monitor.ts index e3f86dac..a0d2935f 100644 --- a/apps/workflows/src/cron/monitor.ts +++ b/apps/workflows/src/cron/monitor.ts @@ -31,7 +31,6 @@ const redis = Redis.fromEnv(); const client = new CloudTasksClient({ projectId: env().GCP_PROJECT_ID, - fallback: "rest", credentials: { client_email: env().GCP_CLIENT_EMAIL, private_key: env().GCP_PRIVATE_KEY.replaceAll("\\n", "\n"), diff --git a/apps/workflows/src/lib/native-fetch.ts b/apps/workflows/src/lib/native-fetch.ts deleted file mode 100644 index e77c193f..00000000 --- a/apps/workflows/src/lib/native-fetch.ts +++ /dev/null @@ -1,6 +0,0 @@ -// google-gax (Cloud Tasks) routes through node-fetch unless `window.fetch` exists, -// and node-fetch on Deno's node:http shim costs ~5x the CPU of native fetch. -// Aliasing window to globalThis exposes window.fetch so google-gax picks native fetch. -// It must be globalThis (not a bare {fetch}) so @t3-oss/env's `"Deno" in window` -// server-detection still sees Deno and treats this as a server, not the browser. -(globalThis as { window?: unknown }).window ??= globalThis; diff --git a/apps/workflows/src/serve.ts b/apps/workflows/src/serve.ts index f6ee2a32..6f520562 100644 --- a/apps/workflows/src/serve.ts +++ b/apps/workflows/src/serve.ts @@ -1,6 +1,5 @@ /// -import "./lib/native-fetch"; import { getLogger } from "@logtape/logtape"; import { env } from "./env";