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

RFC application factories approach #56

Open
lnielsen opened this issue Jan 27, 2016 · 0 comments
Open

RFC application factories approach #56

lnielsen opened this issue Jan 27, 2016 · 0 comments

Comments

@lnielsen
Copy link
Member

Currently we have the following environments where we need a Flask application running:

  • Celery
  • WSGI
  • CLI

For all of them we currently create two Flask application factories:

  • UI app (create_app)
  • API app (UI app creates it and adds it to /api)

Many core Flask Extensions are initialised twice - once on the UI app and once on the API app. The problem with this approach is in all scenarios we create two Flask applications even if we don't need them. E.g. the Celery application only needs one Flask application. Also the CLI shell command and many other commands would need just one Application. The CLI run command will however need the full WSGI application (i.e. the two apps) to run.

It seems to me that our current approach is not ideal, but however also don't have any other ideal solutions.

@lnielsen lnielsen added this to the someday milestone Jan 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants