正在显示
1 个修改的文件
包含
2 行增加
和
4 行删除
| @@ -60,16 +60,14 @@ class GeneratePage extends Command | @@ -60,16 +60,14 @@ class GeneratePage extends Command | ||
| 60 | $this->output(' taskID: ' . $noticeInfo['id'] . ' start'); | 60 | $this->output(' taskID: ' . $noticeInfo['id'] . ' start'); |
| 61 | $c_url = $noticeInfo['data']['c_url']; | 61 | $c_url = $noticeInfo['data']['c_url']; |
| 62 | $c_params = $noticeInfo['data']['c_params']; | 62 | $c_params = $noticeInfo['data']['c_params']; |
| 63 | - try { | ||
| 64 | $re = http_post($c_url, $c_params, [], true); | 63 | $re = http_post($c_url, $c_params, [], true); |
| 65 | if (isset($re['status']) && $re['status'] == 200) { | 64 | if (isset($re['status']) && $re['status'] == 200) { |
| 65 | + $noticeModel->edit(['status'=>1],['id'=>$noticeInfo['id']]); | ||
| 66 | $this->output($c_url . ' | 请求成功'); | 66 | $this->output($c_url . ' | 请求成功'); |
| 67 | } else { | 67 | } else { |
| 68 | + $noticeModel->edit(['status'=>2],['id'=>$noticeInfo['id']]); | ||
| 68 | $this->output($c_url . ' | ' . ($re['message'] ?? '未返回失败原因')); | 69 | $this->output($c_url . ' | ' . ($re['message'] ?? '未返回失败原因')); |
| 69 | } | 70 | } |
| 70 | - } catch (\Exception $e) { | ||
| 71 | - $this->output($c_url . ' | 请求异常:' . $e->getMessage()); | ||
| 72 | - } | ||
| 73 | $this->output(' taskID: ' . $noticeInfo['id'] . ' end'); | 71 | $this->output(' taskID: ' . $noticeInfo['id'] . ' end'); |
| 74 | } catch (\Exception $e) { | 72 | } catch (\Exception $e) { |
| 75 | $this->output(' taskID: ' . $noticeInfo['id'] . ', error: ' . $e->getMessage()); | 73 | $this->output(' taskID: ' . $noticeInfo['id'] . ', error: ' . $e->getMessage()); |
-
请 注册 或 登录 后发表评论