正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -38,7 +38,7 @@ class AiBlogTask extends Command | @@ -38,7 +38,7 @@ class AiBlogTask extends Command | ||
| 38 | public function handle(){ | 38 | public function handle(){ |
| 39 | $aiBlogTaskModel = new AiBlogTaskModel(); | 39 | $aiBlogTaskModel = new AiBlogTaskModel(); |
| 40 | while (true){ | 40 | while (true){ |
| 41 | - $info = $aiBlogTaskModel->where('status',1)->orderBy('id','asc')->first(); | 41 | + $info = $aiBlogTaskModel->where('status',1)->inRandomOrder()->first(); |
| 42 | if(empty($info)){ | 42 | if(empty($info)){ |
| 43 | sleep(300); | 43 | sleep(300); |
| 44 | continue; | 44 | continue; |
| @@ -58,7 +58,7 @@ class AiBlogTask extends Command | @@ -58,7 +58,7 @@ class AiBlogTask extends Command | ||
| 58 | continue; | 58 | continue; |
| 59 | } | 59 | } |
| 60 | if($result['status'] != 200){ | 60 | if($result['status'] != 200){ |
| 61 | - sleep(300); | 61 | + sleep(10); |
| 62 | continue; | 62 | continue; |
| 63 | } | 63 | } |
| 64 | //修改任务状态 | 64 | //修改任务状态 |
-
请 注册 或 登录 后发表评论