Graphile Worker is a job queue for PostgreSQL that runs background tasks with ease. It uses PostgreSQL as the job store, leveraging LISTEN/NOTIFY for real-time job scheduling. Current stable version is 0.16.6, released with a steady cadence. Key differentiators: no external dependencies like Redis, built-in job scheduling, cron-like repeatability, and full TypeScript support. It is designed for high reliability and performance, suitable for production use.
npm install graphile-workerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a worker with a simple 'hello' task, adds a job to the queue, and handles graceful shutdown.
Ensure your database schema matches the new default, or explicitly set schema in options.
Replace { pgClient: client } with { pgPool: client.pool } or similar.Check PostgreSQL configuration and network setup for LISTEN/NOTIFY support.
Upgrade Node.js to version 14 or higher.
Stop the conflicting service or change the PostgreSQL port in connection string.
Run 'npm install graphile-worker' and ensure you use ESM imports (import rather than require).
Check that the pgPool is correctly initialized and connected before using worker functions.