Browse Source

fix: 账号同步和任务清理改为每2小时一次(原为10分钟和4小时)

ethanfly 3 ngày trước cách đây
mục cha
commit
40b51a46d1
2 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 1 1
      client/src/stores/auth.ts
  2. 2 2
      server/src/services/TaskQueueService.ts

+ 1 - 1
client/src/stores/auth.ts

@@ -83,7 +83,7 @@ export const useAuthStore = defineStore('auth', () => {
       enqueueSyncAccountTasks();
     }, initialDelay);
 
-    const intervalMs = 4 * 60 * 60 * 1000; // 每4小时同步一次
+    const intervalMs = 2 * 60 * 60 * 1000; // 每2小时同步一次
     autoAccountSyncTimer = setInterval(() => {
       enqueueSyncAccountTasks();
     }, intervalMs);

+ 2 - 2
server/src/services/TaskQueueService.ts

@@ -44,10 +44,10 @@ class TaskQueueService {
   private cleanupTimer: NodeJS.Timeout | null = null;
 
   constructor() {
-    // 修复: 每10分钟清理一次过旧的已完成任务
+    // 每2小时清理一次过旧的已完成任务
     this.cleanupTimer = setInterval(() => {
       this.performPeriodicCleanup();
-    }, 10 * 60 * 1000);
+    }, 2 * 60 * 60 * 1000);
   }
 
   /**