Add run retry task, run scheduled task functionality

This commit is contained in:
Ken Hibino
2020-12-19 06:35:08 -08:00
parent f527b0c6d8
commit a454f2f094
7 changed files with 207 additions and 2 deletions

View File

@@ -19,6 +19,8 @@ import {
RUN_ALL_RETRY_TASKS_SUCCESS,
RUN_ALL_SCHEDULED_TASKS_SUCCESS,
RUN_DEAD_TASK_SUCCESS,
RUN_RETRY_TASK_SUCCESS,
RUN_SCHEDULED_TASK_SUCCESS,
TasksActionTypes,
} from "../actions/tasksActions";
@@ -45,6 +47,20 @@ function snackbarReducer(
isOpen: false,
};
case RUN_SCHEDULED_TASK_SUCCESS:
return {
isOpen: true,
// TODO: show only task id
message: `Scheduled task ${action.taskKey} is now pending`,
};
case RUN_RETRY_TASK_SUCCESS:
return {
isOpen: true,
// TODO: show only task id
message: `Retry task ${action.taskKey} is now pending`,
};
case RUN_DEAD_TASK_SUCCESS:
return {
isOpen: true,