I have an application using Bull for a queue. Is there a parameter that I can pass it to set a TTL (time to live) for each entry automatically when it's created?
const Queue = require('bull')
const webApiQueue = new Queue('webApi', {redis: REDIS_URL })
// Producer
const webApiProducer = (data) => {
webApiQueue.add(data, { lifo: true })
}
If setting a key with Redis directly, you an use setex key_name 10000 key_data
But how can I implement such in Bull? It's just an API processing queue, and I want it to delete entries after 24hrs automatically.
I'm not seeing anything in the documentation: https://github.com/OptimalBits/bull#documentation