作者 lyh

gx剩余服务时常

... ... @@ -60,8 +60,7 @@ class AiBlogAutoPublish extends Command
public function auto_publish()
{
$this->output('开始自动发布博客文章');
$projects = Project::where('is_ai_blog', 1)->get();
$projects = Project::where('is_ai_blog', 1)->where('delete_status',0)->where('site_status',0)->where('extend_type',0)->get();
foreach ($projects as $project) {
try {
$this->output("项目{$project->id}开始自动发布");
... ... @@ -122,6 +121,7 @@ class AiBlogAutoPublish extends Command
]);
$this->output("自动发布失败:" . $e->getMessage() . $e->getFile() . $e->getLine());
}
sleep(5);
}
}
... ...