Kaynağa Gözat

Self-review

binwiederhier 1 ay önce
ebeveyn
işleme
6886ca24b1
2 değiştirilmiş dosya ile 3 ekleme ve 4 silme
  1. 1 1
      web/src/app/Pruner.js
  2. 2 3
      web/src/app/VersionChecker.js

+ 1 - 1
web/src/app/Pruner.js

@@ -23,7 +23,7 @@ class Pruner {
       clearTimeout(this.timer);
       this.timer = null;
     }
-    console.log("[VersionChecker] Stopped pruner checker");
+    console.log("[Pruner] Stopped worker");
   }
 
   async prune() {

+ 2 - 3
web/src/app/VersionChecker.js

@@ -3,13 +3,12 @@
  * or configuration changes, prompting users to refresh the page.
  */
 
-const CHECK_INTERVAL = 30 * 1000; // 5 * 60 * 1000; // 5 minutes
+const intervalMillis = 5 * 60 * 1000; // 5 minutes
 
 class VersionChecker {
   constructor() {
     this.initialConfigHash = null;
     this.listener = null;
-    console.log("XXXXXXxxxx set listener null");
     this.timer = null;
   }
 
@@ -21,7 +20,7 @@ class VersionChecker {
     // Store initial config hash from the config loaded at page load
     this.initialConfigHash = window.config?.config_hash || "";
     console.log("[VersionChecker] Starting version checker");
-    this.timer = setInterval(() => this.checkVersion(), CHECK_INTERVAL);
+    this.timer = setInterval(() => this.checkVersion(), intervalMillis);
   }
 
   stopWorker() {