作者 lyh

GXgeo设置

@@ -37,12 +37,7 @@ class ProjectComment extends Command @@ -37,12 +37,7 @@ class ProjectComment extends Command
37 37
38 public function handle(){ 38 public function handle(){
39 $projectModel = new Project(); 39 $projectModel = new Project();
40 - while (true){  
41 $ids = $projectModel->selectField(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[1,2,3,4,6]]], 'id'); 40 $ids = $projectModel->selectField(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[1,2,3,4,6]]], 'id');
42 - if(empty($list)){  
43 - sleep(200);  
44 - continue;  
45 - }  
46 foreach ($ids as $id){ 41 foreach ($ids as $id){
47 echo date('Y-m-d H:i:s').'start:' . $id . PHP_EOL; 42 echo date('Y-m-d H:i:s').'start:' . $id . PHP_EOL;
48 $project_id = $id; 43 $project_id = $id;
@@ -55,7 +50,6 @@ class ProjectComment extends Command @@ -55,7 +50,6 @@ class ProjectComment extends Command
55 } 50 }
56 echo date('Y-m-d H:i:s').'end:' . $id . PHP_EOL; 51 echo date('Y-m-d H:i:s').'end:' . $id . PHP_EOL;
57 } 52 }
58 - }  
59 return true; 53 return true;
60 } 54 }
61 55