Giter Club home page Giter Club logo

Comments (10)

mariusa avatar mariusa commented on June 26, 2024

To solve this -- copy-pasting code, don't know how to do another PR when an existing one is opened (and ignored)

def cmd_stop(app):
    """Stop an app, e.g: piku stop <app>"""
    app = exit_if_invalid(app)
    do_stop(app)

def do_stop(app):
    config = glob(join(UWSGI_ENABLED, '{}*.ini'.format(app)))

    if len(config) > 0:
        echo("Stopping app '{}'...".format(app), fg='yellow')
        for c in config:
            remove(c)
    else:
        echo("Error: app '{}' not deployed!".format(app), fg='red')

def do_restart(app):
    """Restarts a deployed app"""
    echo("restarting app '{}'...".format(app), fg='yellow') 
    do_stop(app)
    spawn_app(app)

echo("Error: app '{}' not deployed!".format(app), fg='red') is still wrong. App is deployed, just not running at the moment, need to start it.

from piku.

rcarmo avatar rcarmo commented on June 26, 2024

from piku.

mariusa avatar mariusa commented on June 26, 2024

Hi,

This one: #292

Wishing you well!

from piku.

rcarmo avatar rcarmo commented on June 26, 2024

That PR has no direct relevance onto the issue at hand as far as I can tell. Please be mindful of the limited time we have (and I would suggest catching up on git branching and how to do PRs from the CLI).

from piku.

mariusa avatar mariusa commented on June 26, 2024

That PR has no direct relevance onto the issue at hand as far as I can tell.

Right. I don't know how to create another separate PR. As you said, I might learn that.

Please be mindful of the limited time we have

Got it. I also invested quite some time in understanding part of the current code, improving it and coming up with the next patch.

from piku.

chaegribben avatar chaegribben commented on June 26, 2024

I installed piku on a raspberry pi 3 today and everything was working fine until I restarted the pi, now I can't get anything to run anymore not matter whether I stop, deploy or restart in any order, even destroying the apps and pushing them again had no effect.
I get this message on attempts to restart despite the app being there
Error: app 'myapp' not deployed!

This appears to be related to the issue discussed here. Is there a known cause? I can't see in the PR what would actually fix this.

from piku.

mariusa avatar mariusa commented on June 26, 2024

from piku.

chaegribben avatar chaegribben commented on June 26, 2024

Afraid not. replaced piku.py with the one from your PR and, although I don't get the not deployed message anymore, still nothing runs. None of the node commands I specify for the 'web' entry in my Procfile get run at all anymore. It's as if something didn't restart after I shutdown my pi and yet all of the piku commands are executing. I never get a log file for either of my apps anymore.

from piku.

mariusa avatar mariusa commented on June 26, 2024

Hope @chr15m or @rcarmo can share more insight

from piku.

rcarmo avatar rcarmo commented on June 26, 2024

We’d need to know how it was installed, the OS version and (just a guess here) if the uwsgi service is enabled and running in systemd and picking up the changes piku does to the .ini files inside ~/.piku.

(there are minor differences in Linux distros regarding how uwsgi is configured to restart upon reboot and watch for changes)

It is those changes done by piku.py, when detected, that make uwsgi spawn the app processes. So if you could check if uwsgi is running and provide more details that would be helpful.

from piku.

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.