作者 赵彬吉

update

... ... @@ -55,10 +55,10 @@ class WorkchatMessageSend extends Command
$task->status = MessagePush::STATUS_ERROR;
$task->remark = '请求超时';
}
}catch (\Exception $e){
$this->output('推送消息' . $task->id . '失败:' . $e->getMessage());
} catch (\Exception $e) {
$this->output('推送消息' . $task->id . '失败:' . $e->getLine() . ' - ' . $e->getMessage());
$task->status = MessagePush::STATUS_ERROR;
$task->remark = mb_substr($e->getMessage(), 0 , 200);
$task->remark = mb_substr($e->getMessage(), 0, 200);
}
$task->save();
}
... ...
... ... @@ -191,7 +191,7 @@ class ProjectAssociationServices extends BaseService
$url = 'https://hub.ai.cc/api/globalso_ai_customer_service/send_msg';
$result = Http::withoutVerifying()->withOptions(['proxy' => env('CURL_PROXY')])->timeout(30)->post($url, $param)->json();
if(empty($result) || $result['status'] != 200){
throw new \Exception($result['message'] ?? '');
throw new \Exception(json_encode($result));
}
return true;
}
... ...