Giter VIP home page Giter VIP logo

Comments (2)

ismail-s avatar ismail-s commented on July 22, 2024

Ideas around this

  • I think integrating a particular web app server that can be controlled by the web app itself would work.
    • Essentially a boomerang effect. The web app tells the web app server to restart the web app.
    • I have just run some experiments on this, and uwsgi can do exactly what we want.
    • Within the web app, just import uwsgi and then call uwsgi.reload()
    • The best way of doing this would probably be to fire off some sort of task that runs after the request has been finished. Reason is that we can then return a webpage that says the website is being reloaded, and then redirect the user to the homepage. As soon as the website has reloaded, the request for the homepage will be fulfilled (uwsgi has graceful reloading, so it will just queue up requests whilst reloading the web app).
    • Note reloading would work fine for updates that don't involve the db. However, for updates involving the db, we would need to:
    • Stop the web app
    • Make a backup (if possible) of the db, or at least work on it in a transaction
    • Migrate the db
    • Handle failures by restoring db to original state
    • If successful, start the web app again
    • Alternatively, we could only run restarts like this when it is a simple non-db-migration update
    • Considering that atm only I use this blog, It would work fine for me to just have a page that lets me reload the website.
    • Note that the other use of reloading/restarting is that settings like persona.siteName will get applied.
    • See http://uwsgi-docs.readthedocs.org/en/latest/Spooler.html and http://uwsgi-docs.readthedocs.org/en/latest/PythonDecorators.html

from fireblog.

ismail-s avatar ismail-s commented on July 22, 2024

I have created a reload view, but now just need to link to it in the navbar

from fireblog.

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.