You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Currently we have the following environments where we need a Flask application running:
For all of them we currently create two Flask application factories:
create_app
)/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 CLIrun
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.
The text was updated successfully, but these errors were encountered: