合并分支 'lyh-server' 到 'master'
GXgeo设置 查看合并请求 !2334
正在显示
1 个修改的文件
包含
5 行增加
和
5 行删除
| @@ -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']; |
| @@ -140,7 +140,7 @@ class GeoQuestionRes extends Command | @@ -140,7 +140,7 @@ class GeoQuestionRes extends Command | ||
| 140 | if($geo_result === false){ | 140 | if($geo_result === false){ |
| 141 | $geoResultModel->addReturnId($save_data); | 141 | $geoResultModel->addReturnId($save_data); |
| 142 | }else{ | 142 | }else{ |
| 143 | - $geoResultModel->edit($save_data, ['id' => $geo_result->id]); | 143 | + $geoResultModel->edit($save_data, ['id' => $geo_result['id']]); |
| 144 | } | 144 | } |
| 145 | $save_data['text'] = json_encode(FALSE == empty($data) ? $data : $result,true); | 145 | $save_data['text'] = json_encode(FALSE == empty($data) ? $data : $result,true); |
| 146 | $geoLogModel->addReturnId($data); | 146 | $geoLogModel->addReturnId($data); |
-
请 注册 或 登录 后发表评论