mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Making the stop button instantaneous (#2738)
This commit is contained in:
committed by
GitHub
parent
baebba1159
commit
22d8075c53
@@ -164,15 +164,17 @@ export function postStopQuery(query) {
|
||||
return function (dispatch) {
|
||||
const stopQueryUrl = '/superset/stop_query/';
|
||||
const stopQueryRequestData = { client_id: query.id };
|
||||
dispatch(stopQuery(query));
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
url: stopQueryUrl,
|
||||
data: stopQueryRequestData,
|
||||
success() {
|
||||
if (!query.runAsync) {
|
||||
dispatch(stopQuery(query));
|
||||
}
|
||||
notify.success('Query was stopped.');
|
||||
},
|
||||
error() {
|
||||
notify.error('Failed at stopping query.');
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user