Implement a queue using async/await.
I created a single instance, easy enough to convert to a factory if you want multiple queues or add features like timeout with configuration object.
Although this solution is simple and does not require any additional libraries I do not think it is robust. For example retries after errors or timeouts is not supported. Rather than solve these issues it makes more sense to look at proven solutions such as message/task queues.
Add processing function to queue, here I'm using sequelize ORM with my processing:
import queue from './queue';
queue.push(() =>
models.Method.insertFile({
file: base,
...data,
})
.then(result => console.log('db saved', base))
.catch(err => console.error('db error', base))
);