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 1/3] =?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 From 769193883df33db843c2ab32b2de3a61d02d7179 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 9 Jun 2020 18:40:32 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/AutoPackController.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php index 1031bcf98..6c3ea9fc9 100644 --- a/Application/Admin/Controller/AutoPackController.class.php +++ b/Application/Admin/Controller/AutoPackController.class.php @@ -53,7 +53,7 @@ class AutoPackController extends Think if (Redis::get('console_packing') == 1) { Printer::export('正在打包', true); } - + Redis::set('console_packing', 1); $this->checkPackageStatus(); // $this->app_package();//app渠道自动打包 @@ -313,6 +313,7 @@ class AutoPackController extends Think if (count($applys) == 0) { Printer::export('无等待队列', true); + Redis::delete('console_packing'); } $applyIds = array_column($applys, 'id'); From 02259ae33015962339a5435e07b1bd42961f6fdb Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 9 Jun 2020 18:43:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/AutoPackController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php index 6c3ea9fc9..3971fc44e 100644 --- a/Application/Admin/Controller/AutoPackController.class.php +++ b/Application/Admin/Controller/AutoPackController.class.php @@ -312,8 +312,8 @@ class AutoPackController extends Think ->select(); if (count($applys) == 0) { - Printer::export('无等待队列', true); Redis::delete('console_packing'); + Printer::export('无等待队列', true); } $applyIds = array_column($applys, 'id');