NUEVA BUSQUEDA DE DATOS SRI

This commit is contained in:
2023-04-11 10:50:28 -05:00
parent d9d7eb83cb
commit 6b4b3e263c
612 changed files with 11604 additions and 36692 deletions

View File

@@ -4,7 +4,7 @@ const utils = require('./utils');
var hasPS = true;
// discover if the OS has `ps`, and therefore can use psTree
exec('ps', error => {
exec('ps', (error) => {
module.exports.hasPS = hasPS = !error;
});
@@ -20,9 +20,14 @@ module.exports = function main(pid, callback) {
utils
.getStat()
.then(utils.tree)
.then(tree => utils.pidsForTree(tree, pid))
.then(res => callback(null, res.map(p => p.PID)))
.catch(error => callback(error));
.then((tree) => utils.pidsForTree(tree, pid))
.then((res) =>
callback(
null,
res.map((p) => p.PID)
)
)
.catch((error) => callback(error));
};
if (!module.parent) {