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;
}
$arrChapterPageList = $Site->getChapterPageList($arrData['filter']);
$arrChapterPageList = $Site->getChapterPageList($arrData['filter'],$arrData['n_id']);
$arrNextPageFilterList = [];
foreach ($arrChapterPageList as $ChapterPage) {

View File

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