mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
Making the stop button instantaneous (#2738)
This commit is contained in:
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.');
|
||||
},
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user