Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = async function(...args) {
// Ensure that this function is always called on the master process so we
// don't call multiple installs in parallel.
if (WorkerFarm.isWorker()) {
await WorkerFarm.callMaster({
location: __filename,
args,
});
return;
}
queue.add(...args);
return queue.run();
};