正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -81,6 +81,9 @@ class GeoQuestionRes extends Command | @@ -81,6 +81,9 @@ class GeoQuestionRes extends Command | ||
| 81 | GET_RESULT: | 81 | GET_RESULT: |
| 82 | $error_num++; | 82 | $error_num++; |
| 83 | try { | 83 | try { |
| 84 | + if ($error_num >= 5) { | ||
| 85 | + continue; | ||
| 86 | + } | ||
| 84 | if ($platform == 'Google AI Overview') { | 87 | if ($platform == 'Google AI Overview') { |
| 85 | continue; | 88 | continue; |
| 86 | // overview 数据结构不确定, 需要单独处理数据 | 89 | // overview 数据结构不确定, 需要单独处理数据 |
| @@ -94,10 +97,7 @@ class GeoQuestionRes extends Command | @@ -94,10 +97,7 @@ class GeoQuestionRes extends Command | ||
| 94 | } | 97 | } |
| 95 | } catch (\Exception $e) { | 98 | } catch (\Exception $e) { |
| 96 | $this->output('task id:' . $task_id . ', question: ' . $question . ', platform: ' . $question . ', error: ' . $e->getMessage()); | 99 | $this->output('task id:' . $task_id . ', question: ' . $question . ', platform: ' . $question . ', error: ' . $e->getMessage()); |
| 97 | - if ($error_num < 2) { | ||
| 98 | - goto GET_RESULT; | ||
| 99 | - } | ||
| 100 | - continue; | 100 | + goto GET_RESULT; |
| 101 | } | 101 | } |
| 102 | // 命中文案 | 102 | // 命中文案 |
| 103 | $hit_data[] = $result['text']; | 103 | $hit_data[] = $result['text']; |
-
请 注册 或 登录 后发表评论