fix(timer): 修复 F2 代码质量问题

- HostServiceBase: move Log::error before throw so it actually executes
- TimerBase: remove empty comment block
This commit is contained in:
augushong
2026-05-26 03:15:54 +08:00
parent 6dceb028b3
commit fd89a60425
2 changed files with 1 additions and 4 deletions

View File

@@ -265,8 +265,6 @@ class TimerBase extends Command
continue; continue;
} }
//
$http->request($host . $request_item['target'], [ $http->request($host . $request_item['target'], [
'headers' => [ 'headers' => [
'Host' => $site_host, 'Host' => $site_host,

View File

@@ -93,9 +93,8 @@ class HostServiceBase
Log::info("已将 {$staleCount} 个过期节点标记为离线。"); Log::info("已将 {$staleCount} 个过期节点标记为离线。");
} }
} catch (\Exception $e) { } catch (\Exception $e) {
throw $e;
Log::error("节点 [{$nodeId}] 心跳更新失败: " . $e->getMessage()); Log::error("节点 [{$nodeId}] 心跳更新失败: " . $e->getMessage());
Log::error($e); throw $e;
} }
} }