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