debug-novel-task

This commit is contained in:
make
2025-06-19 19:14:55 +08:00
parent 04701d68f7
commit f126e54166
2 changed files with 18 additions and 16 deletions

View File

@@ -301,7 +301,7 @@ class Scheduler
return; return;
} }
$arrChapterPageList = $Site->getChapterPageList($arrData['filter']); $arrChapterPageList = $Site->getChapterPageList($arrData['filter'],$arrData['n_id']);
$arrNextPageFilterList = []; $arrNextPageFilterList = [];
foreach ($arrChapterPageList as $ChapterPage) { foreach ($arrChapterPageList as $ChapterPage) {

View File

@@ -289,12 +289,10 @@ class Site
* @param array $arrData * @param array $arrData
* @return ChapterPage[] * @return ChapterPage[]
*/ */
public function getChapterPageList(array $arrData): array public function getChapterPageList(array $arrFilter,int $intNid = 0): array
{ {
$QueueManage = QueueManage::getInstance(); $QueueManage = QueueManage::getInstance();
$arrFilter = $arrData['filter'];
/** @var ChapterPage[] */ /** @var ChapterPage[] */
$arrChapterPage = []; $arrChapterPage = [];
@@ -320,6 +318,7 @@ class Site
if (!preg_match($strPattern, $strContent, $arrMatches)) { if (!preg_match($strPattern, $strContent, $arrMatches)) {
var_dump(mb_substr($strContent, 0, 300)); // 防止输出太长 var_dump(mb_substr($strContent, 0, 300)); // 防止输出太长
if($intNid>0){
if ( if (
str_contains($strContent, '超过并发限制') || str_contains($strContent, '超过并发限制') ||
str_contains($strContent, 'Timeout') || str_contains($strContent, 'Timeout') ||
@@ -328,11 +327,14 @@ class Site
// 重新推送任务 // 重新推送任务
$arrTask = [ $arrTask = [
'callback' => [Zw74Scheduler::class, 'getChapterInfo'], 'callback' => [Zw74Scheduler::class, 'getChapterInfo'],
'data' => $arrData, 'data' => [
'n_id' => $intNid,
'filter' => $arrFilter,
],
]; ];
$QueueManage->set($arrTask); $QueueManage->set($arrTask);
} }
}
continue; continue;
} }