move check after cached version
authorAlan <alan@roojs.com>
Fri, 30 Jun 2023 06:05:54 +0000 (14:05 +0800)
committerAlan <alan@roojs.com>
Fri, 30 Jun 2023 06:05:54 +0000 (14:05 +0800)
JsCompile.php

index 71d6ba7..4b10168 100644 (file)
@@ -230,17 +230,8 @@ class Pman_Core_JsCompile  extends Pman
         
         // if packer is running, then dont compile - just output onebyone...
         
-        require_once 'System.php';
-        $pg = System::which('pgrep');
-        $cmd = "$pg roobuilder";
-        $out = trim(`$cmd`);
-        if (strlen($out) > 0) {
-            return false;
-        }
-        
-        
-        
         
+        require_once 'System.php';
         $packer = System::which('roojspacker');
         
         
@@ -261,6 +252,17 @@ class Pman_Core_JsCompile  extends Pman
             return true;
         }
         
+        
+        
+        $pg = System::which('pgrep');
+        $cmd = "$pg roobuilder";
+        $out = trim(`$cmd`);
+        if (strlen($out) > 0) {
+            echo '<!--  onther process is compiling compile. -->';
+            return false;
+        }
+         
+        
         if (file_exists($output)) {
             unlink($output);
         }