Spaces:
Runtime error
Runtime error
Download src/scripts/test-queue.ts from damndeepesh-dev/RippleWorkers: direct link, hf CLI and curl.
- Browser
- Download file 604 Bytes
-
https://huggingface.co/spaces/damndeepesh-dev/RippleWorkers/resolve/main/src/scripts/test-queue.ts
- Command line
-
hf download hf://spaces/damndeepesh-dev/RippleWorkers/src/scripts/test-queue.ts
-
curl -L -o test-queue.ts https://huggingface.co/spaces/damndeepesh-dev/RippleWorkers/resolve/main/src/scripts/test-queue.ts
604 Bytes
| import { enqueuePublishJob } from "@/lib/queue/producer"; | |
| import dotenv from 'dotenv'; | |
| import path from 'path'; | |
| dotenv.config({ path: path.resolve(process.cwd(), '.env.local') }); | |
| async function main() { | |
| console.log("Enqueueing test job..."); | |
| try { | |
| await enqueuePublishJob("test-post-id-123"); | |
| console.log("Job enqueued successfully."); | |
| // Wait a bit to let the worker process it (if running) | |
| await new Promise(r => setTimeout(r, 2000)); | |
| process.exit(0); | |
| } catch (e) { | |
| console.error("Failed:", e); | |
| process.exit(1); | |
| } | |
| } | |
| main(); | |