🔢 Removed the useless LS_IMPORT event
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
IMAGETRANSFORMATION_SERVICE_BASE_URI,
|
||||
LIBRARY_SERVICE_BASE_URI,
|
||||
SEARCH_SERVICE_BASE_URI,
|
||||
JOB_QUEUE_SERVICE_BASE_URI,
|
||||
} from "../constants/endpoints";
|
||||
import {
|
||||
IMS_COMIC_BOOK_GROUPS_FETCHED,
|
||||
@@ -86,10 +87,24 @@ export const fetchComicBookMetadata = () => async (dispatch) => {
|
||||
// autoDismiss: 0,
|
||||
// }),
|
||||
// );
|
||||
dispatch({
|
||||
type: LS_IMPORT,
|
||||
meta: { remote: true },
|
||||
data: {},
|
||||
const sessionId = localStorage.getItem("sessionId");
|
||||
// dispatch({
|
||||
// type: LS_IMPORT,
|
||||
// meta: { remote: true },
|
||||
// data: { sessionId },
|
||||
// });
|
||||
|
||||
await axios.request({
|
||||
url: `${LIBRARY_SERVICE_BASE_URI}/newImport`,
|
||||
method: "POST",
|
||||
data: { sessionId },
|
||||
});
|
||||
};
|
||||
|
||||
export const getImportJobResultStatistics = () => async (dispatch) => {
|
||||
await axios.request({
|
||||
url: `${JOB_QUEUE_SERVICE_BASE_URI}/getJobResultStatistics`,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
export const setQueueControl =
|
||||
@@ -100,6 +115,7 @@ export const setQueueControl =
|
||||
data: { queueAction, queueStatus },
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Fetches comic book metadata for various types
|
||||
* @return metadata for the comic book object categories
|
||||
|
||||
@@ -133,6 +133,7 @@ export const LS_IMPORT_QUEUE_DRAINED = "LS_IMPORT_QUEUE_DRAINED";
|
||||
export const LS_SET_QUEUE_STATUS = "LS_SET_QUEUE_STATUS";
|
||||
export const RESTORE_JOB_COUNTS_AFTER_SESSION_RESTORATION =
|
||||
"RESTORE_JOB_COUNTS_AFTER_SESSION_RESTORATION";
|
||||
export const IMPORT_JOB_RESULTS_RETRIEVED = "IMPORT_JOB_RESULTS_RETRIEVED";
|
||||
|
||||
// Settings
|
||||
export const SETTINGS_CALL_IN_PROGRESS = "SETTINGS_CALL_IN_PROGRESS";
|
||||
|
||||
@@ -77,3 +77,10 @@ export const SOCKET_BASE_URI = hostURIBuilder({
|
||||
port: "3001",
|
||||
apiPath: `/`,
|
||||
});
|
||||
|
||||
export const JOB_QUEUE_SERVICE_BASE_URI = hostURIBuilder({
|
||||
protocol: "http",
|
||||
host: import.meta.env.UNDERLYING_HOSTNAME || "localhost",
|
||||
port: "3000",
|
||||
apiPath: `/api/jobqueue`,
|
||||
});
|
||||
|
||||
@@ -33,6 +33,7 @@ import {
|
||||
LS_IMPORT_QUEUE_DRAINED,
|
||||
LS_SET_QUEUE_STATUS,
|
||||
RESTORE_JOB_COUNTS_AFTER_SESSION_RESTORATION,
|
||||
IMPORT_JOB_RESULTS_RETRIEVED,
|
||||
} from "../constants/action-types";
|
||||
import { removeLeadingPeriod } from "../shared/utils/formatting.utils";
|
||||
import { LIBRARY_SERVICE_HOST } from "../constants/endpoints";
|
||||
@@ -62,6 +63,7 @@ const initialState = {
|
||||
lastQueueJob: "",
|
||||
successfulJobCount: 0,
|
||||
failedJobCount: 0,
|
||||
importJobStatistics: [],
|
||||
libraryQueueResults: [],
|
||||
librarySearchError: {},
|
||||
libraryServiceStatus: {},
|
||||
@@ -230,6 +232,11 @@ function fileOpsReducer(state = initialState, action) {
|
||||
};
|
||||
}
|
||||
}
|
||||
case IMPORT_JOB_RESULTS_RETRIEVED: {
|
||||
return {
|
||||
...state,
|
||||
};
|
||||
}
|
||||
case LS_COMIC_ADDED: {
|
||||
return {
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user