🔧 Wired up jobStatistics call

This commit is contained in:
2023-08-28 23:57:01 -04:00
parent 75777d32dd
commit 80b7113ed5
5 changed files with 485 additions and 434 deletions

View File

@@ -32,6 +32,7 @@ import {
VOLUMES_FETCHED,
LIBRARY_SERVICE_HEALTH,
LS_SET_QUEUE_STATUS,
LS_IMPORT_JOB_STATISTICS_FETCHED,
} from "../constants/action-types";
import { success } from "react-notification-system-redux";
@@ -88,11 +89,9 @@ export const fetchComicBookMetadata = () => async (dispatch) => {
// }),
// );
const sessionId = localStorage.getItem("sessionId");
// dispatch({
// type: LS_IMPORT,
// meta: { remote: true },
// data: { sessionId },
// });
dispatch({
type: LS_IMPORT,
});
await axios.request({
url: `${LIBRARY_SERVICE_BASE_URI}/newImport`,
@@ -102,11 +101,16 @@ export const fetchComicBookMetadata = () => async (dispatch) => {
};
export const getImportJobResultStatistics = () => async (dispatch) => {
await axios.request({
const result = await axios.request({
url: `${JOB_QUEUE_SERVICE_BASE_URI}/getJobResultStatistics`,
method: "GET",
});
dispatch({
type: LS_IMPORT_JOB_STATISTICS_FETCHED,
data: result.data,
});
};
export const setQueueControl =
(queueAction: string, queueStatus: string) => async (dispatch) => {
dispatch({