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