chore: cleanup FAB update perms (#11155)

* chore: Using cache factory method

* chore: Deprecate outdated FAB_UPDATE_PERMS information

Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
John Bodley
2020-10-07 08:33:41 -07:00
committed by GitHub
parent 32e174d4b8
commit 6e0d1b8409
4 changed files with 2 additions and 34 deletions

View File

@@ -65,22 +65,6 @@ you can add the endpoints to `WTF_CSRF_EXEMPT_LIST`:
WTF_CSRF_EXEMPT_LIST = []
```
### Flask AppBuilder Permissions
By default, every time the Flask-AppBuilder (FAB) app is initialized the permissions and views are
added automatically to the backend and associated with the Admin role. The issue, however, is when
you are running multiple concurrent workers this creates a lot of contention and race conditions
when defining permissions and views.
To alleviate this issue, the automatic updating of permissions can be disabled by setting
`FAB_UPDATE_PERMS = False` (defaults to True).
In a production environment initialization could take on the following form:
```
superset init gunicorn -w 10 … superset:app
```
### Running on a WSGI HTTP Server
While you can run Superset on NGINX or Apache, we recommend using Gunicorn in async mode. This