LibreOffice: Remove unnecessary callbackification

`async.queue` will do the right thing if passed an `async` function.
This commit is contained in:
Richard Hansen 2021-03-19 03:43:21 -04:00 committed by John McLear
parent 0233399fdf
commit eb3cff5b3a

View file

@ -74,10 +74,7 @@ const doConvertTask = async (task) => {
};
// Conversion tasks will be queued up, so we don't overload the system
const queue = async.queue(
// For some reason util.callbackify() throws "TypeError [ERR_INVALID_ARG_TYPE]: The last
// argument must be of type Function. Received type object" on Node.js 10.x.
(task, cb) => doConvertTask(task).then(() => cb(), (err) => cb(err || new Error(err))), 1);
const queue = async.queue(doConvertTask, 1);
/**
* Convert a file from one type to another