From 4b3eaf9a73afac3aa38a13be8d58f2687d977ab7 Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Wed, 21 May 2025 15:59:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/application/job/WorkbenchJob.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Server/application/job/WorkbenchJob.php b/Server/application/job/WorkbenchJob.php index 247c5f91..1f3c1484 100644 --- a/Server/application/job/WorkbenchJob.php +++ b/Server/application/job/WorkbenchJob.php @@ -216,8 +216,7 @@ class WorkbenchJob // 子进程 try { foreach ($friendGroup as $friend) { - Log::info("我是一个工作台子进程"); - + // 验证是否达到点赞次数上限 $likeCount = $this->getTodayLikeCount($workbench, $config, $friend['deviceId']); if ($likeCount >= $config['maxLikes']) { @@ -232,7 +231,6 @@ class WorkbenchJob ->count(); if ($friendMaxLikes < $config['friendMaxLikes']) { - Log::info("工作台 {$workbench->id} 开始处理好友 {$friend['friendId']} 的朋友圈"); $this->processFriendMoments($workbench, $config, $friend); } } @@ -330,6 +328,9 @@ class WorkbenchJob // 查询未点赞的朋友圈 $moments = $this->getUnlikedMoments($friend['friendId']); + + Log::info("工作台开始处理好友 {$friend['friendId']} 的朋友圈" . json_encode($moments)); + if (empty($moments)) { Log::info("好友 {$friend['friendId']} 没有需要点赞的朋友圈"); // 处理完毕切换回原账号 @@ -338,6 +339,7 @@ class WorkbenchJob } foreach ($moments as $moment) { + Log::info("工作台开始点赞朋友圈 {$moment['snsId']}"); // 点赞朋友圈 $this->likeMoment($workbench, $config, $friend, $moment, $webSocket);