This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new c2b971a [docs] CONTRIBUTING.md - how to setup SQL Lab in async mode
(#7103)
c2b971a is described below
commit c2b971af913e4e0f555fb0162ef427bbcf7818e8
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Tue Mar 26 22:50:19 2019 -0700
[docs] CONTRIBUTING.md - how to setup SQL Lab in async mode (#7103)
---
CONTRIBUTING.md | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0e6e046..5db5e98 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -52,6 +52,7 @@ little bit helps, and credit will always be given.
- [Creating a new visualization type](#creating-a-new-visualization-type)
- [Adding a DB migration](#adding-a-db-migration)
- [Merging DB migrations](#merging-db-migrations)
+ - [SQL Lab Async](#sql-lab-async)
## Types of Contributions
@@ -686,3 +687,29 @@ To fix it:
```bash
superset db upgrade
```
+
+### SQL Lab Async
+
+It's possible to configure a local database to operate in `async` mode,
+to work on `async` related features.
+
+To do this, you'll need to:
+* Add an additional database entry. We recommend you copy the connection
+ string from the database labeled `main`, and then enable `SQL Lab` and the
+ features you want to use. Don't forget to check the `Async` box
+* Configure a results backend, here's a local `FileSystemCache` example,
+ not recommended for production,
+ but perfect for testing (stores cache in `/tmp`)
+ ```python
+ from werkzeug.contrib.cache import FileSystemCache
+ RESULTS_BACKEND = FileSystemCache('/tmp/sqllab')
+ ```
+
+Note that:
+* for changes that affect the worker logic, you'll have to
+ restart the `celery worker` process for the changes to be reflected.
+* The message queue used is a `sqlite` database using the `SQLAlchemy`
+ experimental broker. Ok for testing, but not recommended in production
+* In some cases, you may want to create a context that is more aligned
+ to your production environment, and use the similar broker as well as
+ results backend configuration