I want to override the .exec function on workerpool but it's calls my console.log twice, can't figure out why :
export const queues = workerpool.pool({
maxWorkers: require("os").cpus().length,
});
const originalExec = queues.exec;
queues.exec = function (method, params, options) {
console.log("task started");
return originalExec.call(queues, method, params, options);
};
Tryed to change the "this" argument on the call, also the .apply() function, the results are the same.