From 136195fedccd9bd17eb309716acefe39988432c4 Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 30 Jun 2023 14:04:14 +0800 Subject: [PATCH] only run one version of packer at a time --- JsCompile.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/JsCompile.php b/JsCompile.php index c53bf6c6..71d6ba72 100644 --- a/JsCompile.php +++ b/JsCompile.php @@ -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) { -- 2.39.2