作者 lyh

gx

@@ -139,7 +139,7 @@ class AiBlogTask extends Command @@ -139,7 +139,7 @@ class AiBlogTask extends Command
139 } 139 }
140 $aiBlogTaskModel = new AiBlogTaskModel(); 140 $aiBlogTaskModel = new AiBlogTaskModel();
141 $finish_at = date('Y-m-d H:i:s', strtotime('-' . $finish_at . ' hour')); 141 $finish_at = date('Y-m-d H:i:s', strtotime('-' . $finish_at . ' hour'));
142 - $ids = $aiBlogTaskModel->formatQuery(['status'=>1,'type'=>2,'created_at'=>['<=',$finish_at]])->limit(1000)->pluck('id'); 142 + $ids = $aiBlogTaskModel->formatQuery(['status'=>$aiBlogTaskModel::STATUS_RUNNING,'type'=>$aiBlogTaskModel::TYPE_BLOG,'created_at'=>['<=',$finish_at]])->limit(1000)->pluck('id');
143 if(!empty($ids)){ 143 if(!empty($ids)){
144 foreach ($ids as $id) { 144 foreach ($ids as $id) {
145 Redis::lpush('ai_blog_task', $id); 145 Redis::lpush('ai_blog_task', $id);