|
...
|
...
|
@@ -60,13 +60,17 @@ class AiBlogAuthorTask extends Command |
|
|
|
$aiBlogService->mch_id = $aiSettingInfo['mch_id'];
|
|
|
|
$aiBlogService->key = $aiSettingInfo['key'];
|
|
|
|
$result = $aiBlogService->getAuthor();
|
|
|
|
if(!isset($result['status']) || !isset($result['data'])){
|
|
|
|
if(!isset($result['status'])){
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if($result['status'] != 200 || empty($result['data'])){
|
|
|
|
if($result['status'] != 200){
|
|
|
|
sleep(10);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if(empty($result['data'])){
|
|
|
|
sleep(20);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
//保存当前项目ai_blog数据
|
|
|
|
ProjectServer::useProject($info['project_id']);
|
|
|
|
$this->saveAiBlogAuthor($result['data'] ?? [],$info['project_id']);
|
...
|
...
|
|