{"repo":"justplainstuff/plainjob","free":true,"listed":false,"github":"https://github.com/justplainstuff/plainjob","clone":"git clone https://github.com/justplainstuff/plainjob.git","description":"SQLite-backed job queue processing 15k jobs/s","language":"TypeScript","stars":98,"topics":["jobs","queue","sqlite","typescript","better-sqlite3","bun","job-queue","task-queue"],"license":"MIT","category":"databases-storage","readme_excerpt":"plainjob A SQLite-backed job queue for better-sqlite3 and bun:sqlite processing 15k jobs/s. Getting Started Using bun Create a queue: Make sure strict mode is enabled! Using node Create a queue: Minimal Example Features - SQLite-backed : Reliable persistence using bun:sqlite or better-sqlite3 - High performance : Process up to 15,000 jobs per second - Cron-scheduled jobs : Easily schedule recurring tasks - Delayed jobs : Run jobs after a specified delay - Automatic job cleanup : Remove old completed and failed jobs - Job timeout handling : Re-queue jobs if a worker dies - Custom logging : Integrate with your preferred logging solution - Lightweight : No external dependencies beyond better-sqlite3 and a cron-parser Usage Creating a Queue Adding Jobs Defining Workers Managing Jobs Advanced Usage Graceful Shutdown To ensure all jobs are processed before shutting down: Multi-process Workers For high-throughput scenarios, you can spawn multiple worker processes. Here's an example based on bench-worker.ts : In worker.ts : This setup allows you to leverage multiple CPU cores for processing jobs in parallel. For more detailed information on the API and advanced usage, please refer to the source code and tests.","default_branch":null,"files":null,"tree":[],"storefront":"/r/justplainstuff","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/justplainstuff/plainjob/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}