From d5d6c255b018d19c69db560e37ecf32a77421e9e Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 9 Jun 2020 18:36:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/AutoPackController.class.php | 7 ++++ Application/Base/Tool/Redis.class.php | 38 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 Application/Base/Tool/Redis.class.php diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php index e7da748cd..1031bcf98 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'); } /** 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