Sfoglia il codice sorgente

照顾较差的服务器的终极优化

刘洋 11 mesi fa
parent
commit
8594f0593d
1 ha cambiato i file con 7 aggiunte e 8 eliminazioni
  1. 7 8
      src/features/ImageDownload/ImageDownload.vue

+ 7 - 8
src/features/ImageDownload/ImageDownload.vue

@@ -43,6 +43,12 @@ let statisticTime = 0;
 let downloadFailStatus = ref(false);
 
 function openSuccessDialog() {
+  if (requestStack.length > 0) {
+    console.warn(
+      `requestStack队列中居然还有某些学生任务未完成!,按道理这应该不可能发生:`,
+      requestStack
+    );
+  }
   const modal = Modal.success({});
   modal.update({
     title:
@@ -356,14 +362,7 @@ const doneTenStudents = () => {
   });
   return new Promise((rs, rj) => {
     const func = (rs: any) => {
-      if (recordManager.curTasksLength <= 0) {
-        if (requestStack.length > 0) {
-          let cloneCurRequestStack = JSON.stringify(requestStack);
-          console.warn(
-            `这一轮的10个学生中,居然还有某些学生任务未完成!,按道理这应该不可能发生:`,
-            cloneCurRequestStack
-          );
-        }
+      if (recordManager.curTasksLength <= 5) {
         //等于-1时,说明离开页面了,需要停止任务。
         cleanTimer();
         rs();