Redis queue for universal-background-jobs.
npm install @universal-packages/background-jobs-redis
npm install @universal-packages/background-jobs
Just pass this engine to the Jobs and Worker instances to enable it to use redis as the queue system.
import { Jobs } from '@universal-packages/universal-background-jobs'
import { RedisQueue } from '@universal-packages/universal-background-jobs-redis'
const jobs = new Registry({ queue: 'redis', queueOptions: { host: 'localhost' } })
await registry.prepare()
RedisQueue
takes the same options as the redis queue standalone interface.
Additionally takes the following ones:
-
globalClient
String
If the redis client lives in a global variable, name it here.
This library is developed in TypeScript and shipped fully typed.
The development of this library happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving this library.