Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anyway to reload only one app in DispatcherMiddleware #932

Closed
humiaozuzu opened this issue Dec 20, 2013 · 3 comments
Closed

Anyway to reload only one app in DispatcherMiddleware #932

humiaozuzu opened this issue Dec 20, 2013 · 3 comments

Comments

@humiaozuzu
Copy link

from http://flask.pocoo.org/docs/patterns/appdispatch

from werkzeug.wsgi import DispatcherMiddleware
from frontend_app import application as frontend
from backend_app import application as backend

application = DispatcherMiddleware(frontend, {
    '/backend':     backend
})

In deployment environment, I can only reload both frontend and backend app.

@ThiefMaster
Copy link
Member

That's correct. When using the dispatcher there's no way to avoid this. However, nothing stops you from keeping the two apps separated (i.e. as two wsgi apps in your webserver / wsgi container).

@humiaozuzu
Copy link
Author

@ThiefMaster Are the two wsgi apps share one process?

@untitaker
Copy link
Contributor

@humiaozuzu Yes they do. If you want to separate them so that you can reload them separately, i would recommend doing the dispatching in nginx or Apache.

@DasIch DasIch closed this as completed Dec 23, 2013
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants