@sb-codex/jobs
v0.0.1-beta.0
Published
BullMQ queue definitions + worker entrypoint for the sb-codex SaaS starter.
Maintainers
Readme
@sb-codex/jobs
BullMQ queue definitions and a worker entrypoint for the sb-codex SaaS starter. Runs background jobs (email, search indexing, webhooks) on Valkey/Redis.
Installation
pnpm add @sb-codex/jobsUsage
import { createQueues } from '@sb-codex/jobs'
const queues = createQueues(process.env.REDIS_URL!)
await queues.email.add('welcome', { to: '[email protected]' })API
| Export | Description |
| ------------------------------------------------------ | ------------------------------- |
| createQueues(redisUrl) | Create the typed BullMQ queues. |
| Queues | Type of the queues object. |
| EmailJobData, SearchIndexJobData, WebhookJobData | Job payload types. |
Worker
pnpm worker # start the worker process (consumes the queues)Part of the sb-codex SaaS starter. See docs/plugins.
