|
...
|
...
|
@@ -60,14 +60,14 @@ class AiBlogTask extends Command |
|
|
|
sleep(10);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
//修改任务状态
|
|
|
|
$aiBlogTaskModel->edit(['status'=>2],['id'=>$info['id']]);
|
|
|
|
//保存当前项目ai_blog数据
|
|
|
|
ProjectServer::useProject($info['project_id']);
|
|
|
|
$aiBlogModel = new AiBlog();
|
|
|
|
$aiBlogModel->edit(['new_title'=>$result['data']['title'],'image'=>$result['data']['thumb'],'text'=>$result['data']['section'],'status'=>2],['task_id'=>$info['task_id']]);
|
|
|
|
$this->updateAiBlogAuthor($aiSettingInfo,$result['data']['author_id']);
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
//修改任务状态
|
|
|
|
$aiBlogTaskModel->edit(['status'=>2],['id'=>$info['id']]);
|
|
|
|
echo '结束->任务id:' . $info['task_id'] . PHP_EOL . date('Y-m-d H:i:s');
|
|
|
|
}
|
|
|
|
return true;
|
...
|
...
|
|