Giter Site home page Giter Site logo

capistrano-pm2's People

Contributors

ajbonner avatar ajimix avatar linyows avatar mengqing avatar tomhanoldt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

capistrano-pm2's Issues

app_status JSON.parse fails if pm2 process not running

Basically, up until PM2 2.4.0, calling jlist would emit a whole bunch of text relating to the pm2 daemon start up if it was not already running. As that text was not json, and capistrano-pm2 passes the output to json.parse it fails.

Discussion regarding the issue is here: Unitech/pm2#281

Basically as of 2.4.0, there's a -s flag which silences the non-json output and ensures this gem works correctly.

I've seen you're not really actively maintaining this but I've made PR #5 to address the issue. It means pm2 2.4.0 would be required as earlier versions do not support the argument.

Update app_status function for latest pm2 version 1.1.1

It appears that the pm2 jlist command no longer (at least in version 1.1.1) takes an application name as a command line argument as per the help pm2 jlist -h. This is a problem, then, because the jlist JSON output is simply an array of objects representing ALL the processes. The app_status method as it currently stands does not account for this format.

Here is an abbreviated example of the jlist JSON output from pm2 v1.1.1

[
  {
    "pid": 0,
    "name": "pm2-test",
    "pm2_env": {
      "status": "stopped"
    }
  }
]

I've overwritten the app_status function in my particular Rake task.

I would like to submit a pull request to update this. Would you be OK with that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.