AWS MemoryDB
import { Cluster } from 'ioredis';
import { Worker } from 'bullmq';
const connection = new Cluster(
[
{
host: 'clustercfg.xxx.amazonaws.com',
port: 6379,
},
],
{
tls: {},
},
);
const worker = new Worker(
'myqueue',
async (job: Job) => {
// Do some usefull stuff
},
{ connection },
);
// ...
// Do not forget to close the connection as well as the worker when shutting down
await worker.close();
await connection.quit();Last updated
Was this helpful?