debug
This commit is contained in:
@@ -217,7 +217,7 @@ class Site
|
|||||||
$incKey = config('task.app_name').'_errer_getNovelPageInfo:' . date('Y-m-d'); // 例如:success_counter:2025-06-15
|
$incKey = config('task.app_name').'_errer_getNovelPageInfo:' . date('Y-m-d'); // 例如:success_counter:2025-06-15
|
||||||
Cache::store('redis')->inc($incKey);
|
Cache::store('redis')->inc($incKey);
|
||||||
|
|
||||||
if(config('task.service.task_debug_log_open_status')){
|
if(config('log.task_debug_log_open_status')){
|
||||||
// 记录失败原因
|
// 记录失败原因
|
||||||
$reason = $arrResult['reason'] instanceof \Exception ? $arrResult['reason']->getMessage() : 'Unknown error';
|
$reason = $arrResult['reason'] instanceof \Exception ? $arrResult['reason']->getMessage() : 'Unknown error';
|
||||||
$strUri = $arrFilter[$intKey]['uri'] ?? '';
|
$strUri = $arrFilter[$intKey]['uri'] ?? '';
|
||||||
@@ -282,7 +282,7 @@ class Site
|
|||||||
} elseif ($arrResult['state'] == 'rejected') {
|
} elseif ($arrResult['state'] == 'rejected') {
|
||||||
$incKey = config('task.app_name').'_errer_getChapterPageList:' . date('Y-m-d'); // 例如:success_counter:2025-06-15
|
$incKey = config('task.app_name').'_errer_getChapterPageList:' . date('Y-m-d'); // 例如:success_counter:2025-06-15
|
||||||
Cache::store('redis')->inc($incKey);
|
Cache::store('redis')->inc($incKey);
|
||||||
if(config('task.service.task_debug_log_open_status')){
|
if(config('log.task_debug_log_open_status')){
|
||||||
// 记录失败原因
|
// 记录失败原因
|
||||||
$reason = $arrResult['reason'] instanceof \Exception ? $arrResult['reason']->getMessage() : 'Unknown error';
|
$reason = $arrResult['reason'] instanceof \Exception ? $arrResult['reason']->getMessage() : 'Unknown error';
|
||||||
$strUri = $arrFilter[$intKey]['uri'] ?? '';
|
$strUri = $arrFilter[$intKey]['uri'] ?? '';
|
||||||
@@ -346,7 +346,7 @@ class Site
|
|||||||
|
|
||||||
$incKey = config('task.app_name').'_errer_getLatestListPageList:' . date('Y-m-d');
|
$incKey = config('task.app_name').'_errer_getLatestListPageList:' . date('Y-m-d');
|
||||||
Cache::store('redis')->inc($incKey);
|
Cache::store('redis')->inc($incKey);
|
||||||
if(config('task.service.task_debug_log_open_status')){
|
if(config('log.task_debug_log_open_status')){
|
||||||
// 记录失败原因
|
// 记录失败原因
|
||||||
$reason = $arrResult['reason'] instanceof \Exception ? $arrResult['reason']->getMessage() : 'Unknown error';
|
$reason = $arrResult['reason'] instanceof \Exception ? $arrResult['reason']->getMessage() : 'Unknown error';
|
||||||
$strUri = $arrFilter[$intKey] ?? '';
|
$strUri = $arrFilter[$intKey] ?? '';
|
||||||
@@ -408,7 +408,7 @@ class Site
|
|||||||
$incKey = config('task.app_name').'_errer_downRemoteImgToLocal:' . date('Y-m-d');
|
$incKey = config('task.app_name').'_errer_downRemoteImgToLocal:' . date('Y-m-d');
|
||||||
Cache::store('redis')->inc($incKey);
|
Cache::store('redis')->inc($incKey);
|
||||||
|
|
||||||
if(config('task.service.task_debug_log_open_status')){
|
if(config('log.task_debug_log_open_status')){
|
||||||
// 记录失败原因
|
// 记录失败原因
|
||||||
$reason = $arrResult['reason'] instanceof \Exception ? $arrResult['reason']->getMessage() : 'Unknown error';
|
$reason = $arrResult['reason'] instanceof \Exception ? $arrResult['reason']->getMessage() : 'Unknown error';
|
||||||
\think\facade\Log::error("Request failed for downRemoteImgToLocal , Reason: {$reason}");
|
\think\facade\Log::error("Request failed for downRemoteImgToLocal , Reason: {$reason}");
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ return [
|
|||||||
// 全局日志处理 支持闭包
|
// 全局日志处理 支持闭包
|
||||||
'processor' => null,
|
'processor' => null,
|
||||||
|
|
||||||
|
'task_debug_log_open_status' => env('TASK_DEBUG_LOG_OPEN_STATUS', false),
|
||||||
|
|
||||||
// 日志通道列表
|
// 日志通道列表
|
||||||
'channels' => [
|
'channels' => [
|
||||||
'file' => [
|
'file' => [
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ return [
|
|||||||
'pid_file' => runtime_path() . 'task.pid',
|
'pid_file' => runtime_path() . 'task.pid',
|
||||||
'task_worker_num' => 0,
|
'task_worker_num' => 0,
|
||||||
|
|
||||||
'task_debug_log_open_status' => env('TASK_DEBUG_LOG_OPEN_STATUS', false),
|
|
||||||
],
|
],
|
||||||
|
|
||||||
# Process Pool, NUM 为设置的任务组进程数 , 根据自身服务器情况增减
|
# Process Pool, NUM 为设置的任务组进程数 , 根据自身服务器情况增减
|
||||||
|
|||||||
Reference in New Issue
Block a user