作者 lyh

gx

@@ -40,7 +40,7 @@ class DeleteProductCategory extends Command @@ -40,7 +40,7 @@ class DeleteProductCategory extends Command
40 * 40 *
41 * @var string 41 * @var string
42 */ 42 */
43 - protected $description = '删除产品关键字'; 43 + protected $description = '删除产品分类';
44 44
45 /** 45 /**
46 * Create a new command instance. 46 * Create a new command instance.
@@ -62,7 +62,10 @@ class ReplaceHtml extends Command @@ -62,7 +62,10 @@ class ReplaceHtml extends Command
62 while (true){ 62 while (true){
63 $replaceHtmlModel = new TemplateReplaceHtml(); 63 $replaceHtmlModel = new TemplateReplaceHtml();
64 $replaceHtmlList = $replaceHtmlModel->list(['status'=>$replaceHtmlModel::STATUS]); 64 $replaceHtmlList = $replaceHtmlModel->list(['status'=>$replaceHtmlModel::STATUS]);
65 - if(!empty($replaceHtmlList)){ 65 + if(empty($replaceHtmlList)){
  66 + sleep(100);
  67 + return true;
  68 + }
66 foreach ($replaceHtmlList as $v){ 69 foreach ($replaceHtmlList as $v){
67 ProjectServer::useProject($v['project_id']); 70 ProjectServer::useProject($v['project_id']);
68 echo '开始,任务id:'.$v['id'].PHP_EOL; 71 echo '开始,任务id:'.$v['id'].PHP_EOL;
@@ -76,8 +79,6 @@ class ReplaceHtml extends Command @@ -76,8 +79,6 @@ class ReplaceHtml extends Command
76 echo '结束'.PHP_EOL; 79 echo '结束'.PHP_EOL;
77 DB::disconnect('custom_mysql'); 80 DB::disconnect('custom_mysql');
78 } 81 }
79 - }  
80 - sleep(5);  
81 return true; 82 return true;
82 } 83 }
83 } 84 }