Skip to content

vishal-bluebash/supabase-support

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Implementation Example with Task Queues Here's an example workflow using a task queue with Supabase and an external processing service:

  1. Create a Task Table: Store tasks and their statuses.

  2. Insert Task into Queue: (Use edge function)

  3. Add a new task entry when processing is required. Background Worker Setup:

  4. Use a separate server or service (e.g., a small EC2 instance, DigitalOcean droplet, or a local machine) to run a background worker that polls for tasks. Process Task in Background:

  5. The worker processes each task and updates the task status in the database when completed. Monitor Task Progress

Step-by-Step Implementation

Install Dependencies:

Use the following command to set up a new Node.js project and install @supabase/supabase-js:

mkdir background-worker
cd background-worker
npm init -y
npm install @supabase/supabase-js

And use code from worker.js file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published