From 04242363a841c20451809b8cd1b875e7e877dc0a Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 23 Apr 2026 18:12:23 +0800 Subject: [PATCH] debug --- code/app/task/module/PlanTask.php | 2 +- code/extend/microserver/ServerManage.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/app/task/module/PlanTask.php b/code/app/task/module/PlanTask.php index 9c8e1d6..f31f5d0 100644 --- a/code/app/task/module/PlanTask.php +++ b/code/app/task/module/PlanTask.php @@ -27,7 +27,7 @@ use app\task\logic\VideoSeoLogic; class PlanTask { - public static function scanPlanTask($arrData) + public static function scanPlanTask($arrData = []) { ProcessSanitizer::destructConnectSource(); diff --git a/code/extend/microserver/ServerManage.php b/code/extend/microserver/ServerManage.php index 4b5e088..1ff9c97 100644 --- a/code/extend/microserver/ServerManage.php +++ b/code/extend/microserver/ServerManage.php @@ -336,7 +336,12 @@ class ServerManage private function cleanupPidFile(): void { $strPidFile = (string) ($this->arrDynamicConfig['service']['pid_file'] ?? ''); - if ($strPidFile !== '' && is_file($strPidFile)) { + if ($strPidFile === '' || !is_file($strPidFile)) { + return; + } + + $intPid = (int) trim((string) @file_get_contents($strPidFile)); + if ($intPid === posix_getpid()) { @unlink($strPidFile); } }