Create your first worker
Setting up your first worker is straightforward and takes just a few minutes.
-
Create your worker
First, create a new Edge Function using the Supabase CLI. Then, replace its content with this code:
-
Start Edge Runtime
Start the Edge Runtime by running the following command:
-
Start your worker
Start the worker by sending an HTTP request to your Edge Function:
-
Process your first message
By default, the worker looks for messages in the
tasks
queue (this name is configurable).Send a test message to the queue:
The worker will process the message immediately.