only run one version of packer at a time
authorAlan <alan@roojs.com>
Fri, 30 Jun 2023 06:04:14 +0000 (14:04 +0800)
committerAlan <alan@roojs.com>
Fri, 30 Jun 2023 06:04:14 +0000 (14:04 +0800)
JsCompile.php

index c53bf6c..71d6ba7 100644 (file)
@@ -228,9 +228,19 @@ class Pman_Core_JsCompile  extends Pman
             return false;
         }
         
-        
+        // 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;
+        }
+        
+        
+        
+        
         $packer = System::which('roojspacker');
         
         
@@ -306,6 +316,15 @@ class Pman_Core_JsCompile  extends Pman
         
     }
     
+    
+    function packIsRunning()
+    {
+        require_once 'System.php';
+      
+        
+    }
+    
+    
     // depricated verison using seed.
     function packSeed($files, $output, $translation_base=false)
     {