Coder Social home page Coder Social logo

Comments (6)

wavded avatar wavded commented on August 17, 2024

I see that documentation supports this on the home page, but it hasn't worked for me. Here's the code I run.

ssh user@server forever stop /path/to/app.js
rsync app.js user@server:/path/to/app.js
ssh user@server forever start /path/to/app.js

Start always works, but stop just tells me it can't find a process at that index so I end up getting multiple processes started each time run, but none stopped.

from forever.

indexzero avatar indexzero commented on August 17, 2024

That's a error in the documentation. Forever is not designed to work with script names because it is impossible to disambiguate the following behavior:

$ forever start myapp.js
$ forever start myapp.js
$ forever stop myapp.js

Sometimes you may want to start multiple instances of a script running concurrently, and I haven't thought up a good way to handle that scenario which is why I chose indexes.

I will take this under consideration though. Thanks

from forever.

outbounder avatar outbounder commented on August 17, 2024

Hi there, I've stumbled upon the same problem so made a quick 'workaround', which you can review at any time: ActiveUnits@869b824

I can create a pull request if you need that, however the change is rather trivial (+ needs refractoring anyway).

Best regards and even bigger kudos for the well done job with forever,
Boris

from forever.

indexzero avatar indexzero commented on August 17, 2024

Fixed in 14c7aa8 ... @outbounder went a different way for the implementation so it wasn't limited to bin/forever usage. Thanks for the suggestion.

from forever.

indexzero avatar indexzero commented on August 17, 2024

Oh, and the expected behavior is that calling 'forever stop myapp.js' will stop ALL instances of myapp.js running via forever so be aware.

from forever.

wavded avatar wavded commented on August 17, 2024

Perfect, thanks you guys! I think this will helpful.

from forever.

Related Issues (20)

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.