作者 lyh

gx

@@ -40,7 +40,8 @@ class AiBlogTask extends Command @@ -40,7 +40,8 @@ class AiBlogTask extends Command
40 while (true){ 40 while (true){
41 $info = $aiBlogTaskModel->where('status',1)->orderBy('id','asc')->first(); 41 $info = $aiBlogTaskModel->where('status',1)->orderBy('id','asc')->first();
42 if($info === false){ 42 if($info === false){
43 - sleep(10); 43 + sleep(20);
  44 + continue;
44 } 45 }
45 $info = $info->toArray(); 46 $info = $info->toArray();
46 echo '开始->任务id:' . $info['task_id'] . PHP_EOL . date('Y-m-d H:i:s'); 47 echo '开始->任务id:' . $info['task_id'] . PHP_EOL . date('Y-m-d H:i:s');
@@ -52,7 +53,7 @@ class AiBlogTask extends Command @@ -52,7 +53,7 @@ class AiBlogTask extends Command
52 $aiBlogService->task_id = $info['task_id']; 53 $aiBlogService->task_id = $info['task_id'];
53 $result = $aiBlogService->getDetail(); 54 $result = $aiBlogService->getDetail();
54 if($result['status'] != 200){ 55 if($result['status'] != 200){
55 - sleep(5); 56 + sleep(10);
56 continue; 57 continue;
57 } 58 }
58 //修改任务状态 59 //修改任务状态