Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Jobs Queue Poller

A simple Python-based queue poller for processing background jobs using Supabase pgmq queue and Resend for email processing.

Setup

  1. Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Create a virtual environment and install dependencies:
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -r requirements.txt
  1. Create a .env file with the following variables:
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
RESEND_API_KEY=your_resend_api_key
POLL_BATCH_SIZE=10  # Optional, defaults to 10
VISIBILITY_TIMEOUT=3600  # Optional, defaults to 3600 seconds

Running the Worker

deno run dev

Railway Deployment

  1. Create a new service in Railway
  2. Connect your GitHub repository
  3. Set the environment variables in Railway's dashboard
  4. Deploy!

The service will automatically start the queue poller when deployed.