perf: 调整
This commit is contained in:
@ -350,7 +350,7 @@ const getSyncTaskStatus = async (id, notificationId) => {
|
|||||||
if (data?.status !== 0) {
|
if (data?.status !== 0) {
|
||||||
clearQueryTaskTimer();
|
clearQueryTaskTimer();
|
||||||
notificationId && Notification.remove(notificationId);
|
notificationId && Notification.remove(notificationId);
|
||||||
showImportResultNotification(data)
|
showImportResultNotification(data);
|
||||||
getData();
|
getData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -358,7 +358,7 @@ const getSyncTaskStatus = async (id, notificationId) => {
|
|||||||
const handleGetImportTaskStatus = (id, notificationId) => {
|
const handleGetImportTaskStatus = (id, notificationId) => {
|
||||||
clearQueryTaskTimer();
|
clearQueryTaskTimer();
|
||||||
getSyncTaskStatus(id, notificationId);
|
getSyncTaskStatus(id, notificationId);
|
||||||
queryTaskTimer = setInterval(getSyncTaskStatus, 3000);
|
queryTaskTimer = setInterval(() => getSyncTaskStatus(id, notificationId), 3000);
|
||||||
};
|
};
|
||||||
const clearSyncDataTimer = () => {
|
const clearSyncDataTimer = () => {
|
||||||
if (syncDataTimer) {
|
if (syncDataTimer) {
|
||||||
|
|||||||
@ -115,7 +115,6 @@ const addAccountModalRef = ref(null);
|
|||||||
const deleteAccountRef = ref(null);
|
const deleteAccountRef = ref(null);
|
||||||
let queryTaskTimer = null;
|
let queryTaskTimer = null;
|
||||||
|
|
||||||
|
|
||||||
const pageInfo = ref({
|
const pageInfo = ref({
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
@ -272,7 +271,7 @@ const getSyncTaskStatus = async (id, notificationId) => {
|
|||||||
const handleGetImportTaskStatus = (id, notificationId) => {
|
const handleGetImportTaskStatus = (id, notificationId) => {
|
||||||
clearQueryTaskTimer();
|
clearQueryTaskTimer();
|
||||||
getSyncTaskStatus(id, notificationId);
|
getSyncTaskStatus(id, notificationId);
|
||||||
queryTaskTimer = setInterval(getSyncTaskStatus, 3000);
|
queryTaskTimer = setInterval(() => getSyncTaskStatus(id, notificationId), 3000);
|
||||||
};
|
};
|
||||||
const clearQueryTaskTimer = () => {
|
const clearQueryTaskTimer = () => {
|
||||||
if (queryTaskTimer) {
|
if (queryTaskTimer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user