diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php index 22a1e1332..59eb2715e 100644 --- a/Application/Admin/Controller/AutoPackController.class.php +++ b/Application/Admin/Controller/AutoPackController.class.php @@ -49,20 +49,21 @@ class AutoPackController extends Think $progressLimit = C('PACK_PROGRESS_LIMIT', null, 1); $currentProgress = Redis::incr('console_packing'); + $progressId = date('His') . rand(100, 999) . $currentProgress; if ($currentProgress > $progressLimit) { Redis::decr('console_packing'); Printer::export('打包进程已满,进程数量限制[' . $progressLimit . ']', true); } - Printer::export('打包进程[' . $currentProgress . ']开始'); + Printer::export('打包进程[' . $progressId . ']开始'); $this->checkPackageStatus(); // $this->app_package();//app渠道自动打包 - $result = $this->channel($currentProgress); + $result = $this->channel($progressId); // $this->launch_package(false); // $this->leak_detection(); Redis::decr('console_packing'); - $message = '打包进程[' . $currentProgress . ']结束。' + $message = '打包进程[' . $progressId . ']结束。' . '处理数量[' . $result['total'] . '],' . '成功数量[' . $result['success'] . '],' . '失败数量[' . $result['error'] . ']'; @@ -306,7 +307,7 @@ class AutoPackController extends Think /** * 渠道游戏打包 */ - private function channel($currentProgress = 0) { + private function channel($progressId = 0) { $map = []; $map['status'] = 1; $map['enable_status'] = ['in', '0,2']; @@ -347,7 +348,7 @@ class AutoPackController extends Think $game = $games[$apply['game_id']]; $launchCount = $launchCountList[$apply['id']] ?? 0; $result = $gameSourceService->channelPack($gameSource, $game, $apply, $launchCount); - $message = '进程[' . $currentProgress . '],游戏['. $apply['game_id'] . '],渠道['. $apply['promote_id'] . ']打包,'; + $message = '进程[' . $progressId . '],游戏['. $apply['game_id'] . '],渠道['. $apply['promote_id'] . ']打包,'; $packResult['total'] += 1; if ($result['status']) { $message = 'SUCCESS ----- ' . $message . $result['message'];