mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-10-23 14:56:13 +08:00
Add run-all dead tasks action button to DeadTasksTable
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
LIST_PENDING_TASKS_SUCCESS,
|
||||
LIST_RETRY_TASKS_SUCCESS,
|
||||
LIST_SCHEDULED_TASKS_SUCCESS,
|
||||
RUN_ALL_DEAD_TASKS_SUCCESS,
|
||||
RUN_DEAD_TASK_SUCCESS,
|
||||
TasksActionTypes,
|
||||
} from "../actions/tasksActions";
|
||||
@@ -256,6 +257,24 @@ function queuesReducer(
|
||||
return { ...state, data: newData };
|
||||
}
|
||||
|
||||
case RUN_ALL_DEAD_TASKS_SUCCESS: {
|
||||
const newData = state.data.map((queueInfo) => {
|
||||
if (queueInfo.name !== action.queue) {
|
||||
return queueInfo;
|
||||
}
|
||||
return {
|
||||
...queueInfo,
|
||||
currentStats: {
|
||||
...queueInfo.currentStats,
|
||||
pending:
|
||||
queueInfo.currentStats.pending + queueInfo.currentStats.dead,
|
||||
dead: 0,
|
||||
},
|
||||
};
|
||||
});
|
||||
return { ...state, data: newData };
|
||||
}
|
||||
|
||||
case DELETE_ALL_DEAD_TASKS_SUCCESS: {
|
||||
const newData = state.data.map((queueInfo) => {
|
||||
if (queueInfo.name !== action.queue) {
|
||||
|
Reference in New Issue
Block a user