How to use the pm2.describeAsync function in pm2

To help you get started, we’ve selected a few pm2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FirstLegoLeague / launcher / src / main / services.js View on Github external
      .then(() => pm2.describeAsync(serviceId))
      .then(([description]) => description.pm2_env.status === 'online')
github FirstLegoLeague / launcher / src / main / services.js View on Github external
function check () {
      pm2.describeAsync(serviceId)
        .then(([description]) => {
          if (description.pm2_env.status === 'stopped') {
            resolve()
          } else {
            setTimeout(check, 100)
          }
        })
        .catch(reject)
    }