ExuluJobs is a plain object that exposes the backend’s Redis connection so you can interact with BullMQ queues and Redis data directly. It gives you access to the same Redis instance that ExuluQueues uses internally, without going through the queue registry.
Use ExuluJobs when you need raw Redis access — for example, to read job data, publish pub/sub messages, or build tooling that sits alongside the queue system. For queue registration and worker management, use ExuluQueues instead.
API surface
ExuluJobs.redis
RedisClientType instance, or null when Redis is not configured (no REDIS_HOST / REDIS_PORT in the environment). The client is memoized — calling redis() multiple times returns the same connection.
client is a node-redis RedisClientType. All standard node-redis methods are available.
Example
Notes
- When Redis credentials include a password, the client URL is constructed as
redis://<user>:<password>@<host>:<port>. - Connection errors are logged to stderr; the function returns
{ client: null }on failure rather than throwing, so callers can degrade gracefully. ExuluJobs.redisis the same connection used internally byExuluQueues— do not close it from application code.
Related
- ExuluQueues — introduction: register queues and workers.
- Self-hosting / Redis: configure the Redis service.