I have a queue with concurrency = 1, because we're rate limited by an external API. I'd like to set

I have a queue with concurrency = 1, because we're rate limited by an external API. I'd like to set up a system, where as soon as the call to the external API is completed, a new message gets pulled from the queue, while the previous worker is still handling persisting the data to the database.

Right now, if you ack() a message, while you're still handling some stuff inside a ctx.awaitUntil(), the queue will wait with handling the next batch until the
waitUntil
is fully handled.

Any idea on how we could solve this with queues?
Was this page helpful?