Comments (2)
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 calluwsgi.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.
I have created a reload view, but now just need to link to it in the navbar
from fireblog.
Related Issues (20)
- Handle more errors
- Stop using persona for login HOT 1
- Handle new deps on auto-update
- Create simple theme
- Draft
- Minify all resources
- Fix edit textbox size in simple theme
- Add sorting to multiple post display HOT 2
- Make all form submits work by pressing Enter HOT 1
- Add setting for length of paginated pages
- Remove dependency on personatestuser.org
- Combine all commands into one HOT 1
- Use https://requires.io/
- Add support for chrome custom tabs
- Improve performance
- Look into event dispatching
- Improve reload template
- Add alt text to polymer icons
- Change 'pserve' command to 'uwsgi' one
- Handle new packages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fireblog.