queryServices() returns only services in the RUNNING state
adityamedhe opened this issue · comments
Aditya Medhe commented
The documentation on NPM says that queryServices()
returns all the services installed on the system. However on running the method, I can see only the services in the RUNNING state being returned in the callback.
My code, for reference:
I am calling the method every second, and storing the retrieved information in infoStore
, which is then sent as a HTTP response to every client.
var infoStore = {};
setInterval(serviceManager.queryServices, 1000, function(err, services) {
console.log('HEART_BEAT');
infoStore = services;
});
Aditya Medhe commented
I have created a pull request - #2 to solve this issue. Please let me know your thoughts.
Tony BenBrahim commented
Thank you very much for the PR, it is merged now.