feat: cancel db query on stop (#15403)

* feat: cancel db query on stop

* fix pylint

* Add unit tests

* Do not bind multiple times

* Stop only running queries

* Postgres to cancel only the required query

* Remove extra log

* Add docstring

* Better types, docstring and naming

* Use python3 format strings

* Update superset/sql_lab.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Add cancel_query_on_windows_unload option to database

* Return cancel_query as bool

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
This commit is contained in:
Peter Kosztolanyi
2021-07-13 17:09:22 +01:00
committed by GitHub
parent a914e3c1cb
commit 02032ee8a4
16 changed files with 281 additions and 4 deletions

View File

@@ -177,6 +177,7 @@ class TestDatabaseApi(SupersetTestCase):
"database_name",
"explore_database_id",
"expose_in_sqllab",
"extra",
"force_ctas_schema",
"id",
]