diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php index e7da748cd..3971fc44e 100644 --- a/Application/Admin/Controller/AutoPackController.class.php +++ b/Application/Admin/Controller/AutoPackController.class.php @@ -21,6 +21,7 @@ use BaiduBce\Log\LogFactory; use Think\Think; use Base\Service\GameSourceService; use Base\Tool\Printer; +use Base\Tool\Redis; /** * 后台首页控制器 @@ -49,11 +50,17 @@ class AutoPackController extends Think exit; } + if (Redis::get('console_packing') == 1) { + Printer::export('正在打包', true); + } + + Redis::set('console_packing', 1); $this->checkPackageStatus(); // $this->app_package();//app渠道自动打包 $this->channel(); // $this->launch_package(false); // $this->leak_detection(); + Redis::delete('console_packing'); } /** @@ -305,6 +312,7 @@ class AutoPackController extends Think ->select(); if (count($applys) == 0) { + Redis::delete('console_packing'); Printer::export('无等待队列', true); } diff --git a/Application/Base/Tool/Redis.class.php b/Application/Base/Tool/Redis.class.php new file mode 100644 index 000000000..8c8988b1a --- /dev/null +++ b/Application/Base/Tool/Redis.class.php @@ -0,0 +1,38 @@ +connect($host, $port, $timeout); + if($auth !== null) { + $handler->auth($auth); + } + return $handler; + } + + public static function __callStatic($method, $arguments) + { + return call_user_func_array([self::getHandler(), $method], $arguments); + } +} \ No newline at end of file