作者 lyh

gx

... ... @@ -48,11 +48,10 @@ class ReplaceHtml extends Command
*/
public function handle()
{
while (true){
$replaceHtmlModel = new TemplateReplaceHtml();
$replaceHtmlList = $replaceHtmlModel->list(['status'=>$replaceHtmlModel::STATUS]);
if(empty($replaceHtmlList)){
return true;
}
if(!empty($replaceHtmlList)){
foreach ($replaceHtmlList as $k => $v){
ProjectServer::useProject($v['project_id']);
echo '开始,任务id:'.$v['id'].PHP_EOL;
... ... @@ -62,8 +61,11 @@ class ReplaceHtml extends Command
echo '结束'.PHP_EOL;
DB::disconnect('custom_mysql');
}
}
sleep(5);
return true;
}
}
/**
* @remark :生成子任务
... ...