mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
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:
committed by
GitHub
parent
a914e3c1cb
commit
02032ee8a4
@@ -294,6 +294,24 @@ const ExtraOptions = ({
|
||||
/>
|
||||
</div>
|
||||
</StyledInputContainer>
|
||||
<StyledInputContainer css={{ no_margin_bottom }}>
|
||||
<div className="input-container">
|
||||
<IndeterminateCheckbox
|
||||
id="cancel_query_on_windows_unload"
|
||||
indeterminate={false}
|
||||
checked={!!db?.extra_json?.cancel_query_on_windows_unload}
|
||||
onChange={onExtraInputChange}
|
||||
labelText={t('Cancel query on window unload event')}
|
||||
/>
|
||||
<InfoTooltip
|
||||
tooltip={t(
|
||||
'Terminate running queries when browser window closed or navigated ' +
|
||||
'to another page. Available for Presto, Hive, MySQL, Postgres and ' +
|
||||
'Snowflake databases.',
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</StyledInputContainer>
|
||||
</Collapse.Panel>
|
||||
<Collapse.Panel
|
||||
header={
|
||||
|
||||
Reference in New Issue
Block a user