diff --git a/docs/config/extensions/prismaExtension.mdx b/docs/config/extensions/prismaExtension.mdx index 2d057cc264..c4219e854b 100644 --- a/docs/config/extensions/prismaExtension.mdx +++ b/docs/config/extensions/prismaExtension.mdx @@ -137,6 +137,32 @@ export default defineConfig({ These environment variables are only used during the build process and are not embedded in the final container image. +If you're experiencing database connection issues during deployment, you may need to add `?connection_limit=1` to your `DATABASE_URL` to limit the number of concurrent connections during the build process. + + + +### Using with Supabase Supavisor + +When using Prisma with Supabase's Supavisor pooler, use a pooled URL for Prisma Client and a session/direct URL for schema operations to avoid prepared statement conflicts. As of Feb 28, 2025, port 6543 runs Transaction Mode only; use port 5432 for Session Mode. + +```ts +prismaExtension({ + schema: "prisma/schema.prisma", + directUrlEnvVarName: "DATABASE_URL_UNPOOLED", +}), +``` + +```bash +# Environment variables +# Pooled (Transaction Mode, port 6543) +DATABASE_URL="postgresql://postgres.[PROJECT_REF]:@aws-0-[REGION].pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1" +# Session/Direct (used by Prisma schema engine, port 5432) +DATABASE_URL_UNPOOLED="postgresql://postgres.[PROJECT_REF]:@aws-0-[REGION].pooler.supabase.com:5432/postgres" +``` + + + Use the pooled connection (port 6543, Transaction Mode) for regular Prisma Client queries. Use the + session/direct connection (port 5432, Session Mode) for migrations and other schema operations. ### Multiple schemas diff --git a/docs/docs.json b/docs/docs.json index 5cd39f727e..5755a7b4dd 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -341,7 +341,6 @@ "guides/example-projects/human-in-the-loop-workflow", "guides/example-projects/mastra-agents-with-memory", "guides/example-projects/meme-generator-human-in-the-loop", - "guides/example-projects/openai-agent-sdk-guardrails", "guides/example-projects/openai-agents-sdk-typescript-playground", "guides/example-projects/realtime-csv-importer", "guides/example-projects/realtime-fal-ai", @@ -353,6 +352,7 @@ { "group": "Python guides", "pages": [ + "guides/example-projects/openai-agent-sdk-guardrails", "guides/python/python-image-processing", "guides/python/python-doc-to-markdown", "guides/python/python-crawl4ai", diff --git a/docs/images/intro-frameworks.jpg b/docs/images/intro-mcp.jpg similarity index 100% rename from docs/images/intro-frameworks.jpg rename to docs/images/intro-mcp.jpg diff --git a/docs/introduction.mdx b/docs/introduction.mdx index 0180bf1ef5..67c9d397bb 100644 --- a/docs/introduction.mdx +++ b/docs/introduction.mdx @@ -7,17 +7,17 @@ mode: "center" - Get started with Trigger.dev in 3 minutes - - - Explore dozens of examples tasks to use in your own projects + Get started with Trigger.dev and run your first task in 3 minutes - Learn how to use Trigger.dev with your favorite frameworks + Browse our wide range of guides, frameworks and example projects + + + Learn how to install and configure the Trigger.dev MCP Server Watch an end-to-end demo of Trigger.dev in 10 minutes @@ -74,26 +74,17 @@ We provide everything you need to build and manage background tasks: a CLI and S Configure what you want to happen when there is more than one run at a time. - - -## Explore by example - - - - - - - - - - - - - - - - - + + Pause runs until a token is completed via an approval workflow. + + + Customize the build process or the resulting bundle and container image. + ## Explore by build extension @@ -102,7 +93,9 @@ We provide everything you need to build and manage background tasks: a CLI and S | :-------------------- | :----------------------------------------------------------- | :----------------------------------------------------- | | prismaExtension | Use Prisma with Trigger.dev | [Learn more](/config/extensions/prismaExtension) | | pythonExtension | Execute Python scripts in Trigger.dev | [Learn more](/config/extensions/pythonExtension) | +| playwright | Use Playwright with Trigger.dev | [Learn more](/config/extensions/playwright) | | puppeteer | Use Puppeteer with Trigger.dev | [Learn more](/config/extensions/puppeteer) | +| lightpanda | Use Lightpanda with Trigger.dev | [Learn more](/config/extensions/lightpanda) | | ffmpeg | Use FFmpeg with Trigger.dev | [Learn more](/config/extensions/ffmpeg) | | aptGet | Install system packages with aptGet | [Learn more](/config/extensions/aptGet) | | additionalFiles | Copy additional files to the build directory | [Learn more](/config/extensions/additionalFiles) | @@ -112,6 +105,78 @@ We provide everything you need to build and manage background tasks: a CLI and S | emitDecoratorMetadata | Support for the emitDecoratorMetadata TypeScript compiler | [Learn more](/config/extensions/emitDecoratorMetadata) | | audioWaveform | Support for Audio Waveform in your project | [Learn more](/config/extensions/audioWaveform) | +## Explore by example + + + + + + + + + + + + + + + + + + + ## Getting help We'd love to hear from you or give you a hand getting started. Here are some ways to get in touch with us. diff --git a/docs/wait-for-token.mdx b/docs/wait-for-token.mdx index f2c71ca016..4f5a8faedd 100644 --- a/docs/wait-for-token.mdx +++ b/docs/wait-for-token.mdx @@ -1,6 +1,6 @@ --- title: "Wait for token" -description: "Wait until a token is completed." +description: "Wait until a token is completed using waitpoint tokens." --- Waitpoint tokens pause task runs until you complete the token. They're commonly used for approval workflows and other scenarios where you need to wait for external confirmation, such as human-in-the-loop processes. @@ -50,7 +50,7 @@ await wait.completeToken(tokenId, { }); ``` -Or you can make an HTTP POST request to the `url` it returns: +Or you can make an HTTP POST request to the `url` it returns. This is an HTTP callback: ```ts import { wait } from "@trigger.dev/sdk"; @@ -502,4 +502,4 @@ const token = await wait.createToken({ idempotencyKey: "my-idempotency-key", idempotencyKeyTTL: "1h", }); -``` \ No newline at end of file +```