Skip to content

Commit bba83c9

Browse files
committed
Updates and added images
1 parent d9fbd1c commit bba83c9

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

docs/guides/frameworks/supabase-edge-functions-database-webhooks.mdx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,8 @@ export const videoProcessAndUpdate = task({
212212
// Find the row by its ID
213213
.eq("id", id);
214214

215-
// If there was an error updating the subscription, throw an error
216215
if (updateError) {
217-
throw new Error(`Failed to update user subscription: ${updateError.message}`);
216+
throw new Error(`Failed to update transcription: ${updateError.message}`);
218217
}
219218

220219
return {
@@ -225,6 +224,12 @@ export const videoProcessAndUpdate = task({
225224
});
226225
```
227226

227+
<Warning>
228+
When updating your tables from a Trigger.dev task which has been triggered by a database change,
229+
be extremely careful to not cause an infinite loop. Ensure you have the correct conditions in
230+
place to prevent this.
231+
</Warning>
232+
228233
### Adding the FFmpeg build extension
229234

230235
Before you can deploy the task, you'll need to add the FFmpeg build extension to your `trigger.config.ts` file.
@@ -400,8 +405,12 @@ You can use the following public video URL for testing: `https://content.trigger
400405

401406
Once the new table row has been inserted, check your [cloud.trigger.dev](http://cloud.trigger.dev) project 'Runs' list <Icon icon="circle-1" iconType="solid" size={20} color="A8FF53" /> and you should see a processing `videoProcessAndUpdate` task <Icon icon="circle-2" iconType="solid" size={20} color="A8FF53" /> which has been triggered when you added a new row with the video url to your `video_transcriptions` table.
402407

408+
![Supabase successful run](/images/supabase-run-result.png)
409+
403410
Once the run has completed successfully, go back to your Supabase `video_transcriptions` table, and you should see that in the row containing the original video URL, the transcription has now been added to the `transcription` column.
404411

412+
![Supabase successful table update](/images/supabase-table-result.png)
413+
405414
**Congratulations! You have completed the full workflow from Supabase to Trigger.dev and back again.**
406415

407416
<SupabaseDocsCards />

docs/images/supabase-new-table-4.png

-289 KB
Loading

docs/images/supabase-run-result.png

635 KB
Loading

docs/images/supabase-table-result.png

76.2 KB
Loading
-16 KB
Loading

0 commit comments

Comments
 (0)