Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const loadServices = _.debounce(() => {
broker.logger.info(kleur.bgMagenta().white().bold(`Load ${needToLoad.size} service(s)...`));
needToLoad.forEach(filename => {
try {
broker.loadService(filename);
} catch(err) {
broker.logger.error(`Failed to load service '${filename}'`, err);
clearRequireCache(filename);
}
});
needToLoad.clear();
}, 500);