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,19 +318,23 @@ 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 ( if($intNid>0){
str_contains($strContent, '超过并发限制') || if (
str_contains($strContent, 'Timeout') || str_contains($strContent, '超过并发限制') ||
str_contains($strContent, '403 Forbidden') str_contains($strContent, 'Timeout') ||
) { str_contains($strContent, '403 Forbidden')
// 重新推送任务 ) {
$arrTask = [ // 重新推送任务
'callback' => [Zw74Scheduler::class, 'getChapterInfo'], $arrTask = [
'data' => $arrData, 'callback' => [Zw74Scheduler::class, 'getChapterInfo'],
]; 'data' => [
$QueueManage->set($arrTask); 'n_id' => $intNid,
'filter' => $arrFilter,
],
];
$QueueManage->set($arrTask);
}
} }
continue; continue;
} }