mirror of
https://github.com/apache/superset.git
synced 2026-04-21 09:04:38 +00:00
fix(sqllab): infinite running state on disconnect (#23669)
This commit is contained in:
@@ -742,6 +742,21 @@ export default function sqlLabReducer(state = {}, action) {
|
||||
}
|
||||
return { ...state, queries: newQueries, queriesLastUpdate };
|
||||
},
|
||||
[actions.CLEAR_INACTIVE_QUERIES]() {
|
||||
const { queries } = state;
|
||||
const cleanedQueries = Object.fromEntries(
|
||||
Object.entries(queries).filter(([, query]) => {
|
||||
if (
|
||||
['running', 'pending'].includes(query.state) &&
|
||||
query.progress === 0
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}),
|
||||
);
|
||||
return { ...state, queries: cleanedQueries };
|
||||
},
|
||||
[actions.SET_USER_OFFLINE]() {
|
||||
return { ...state, offline: action.offline };
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user