作者 赵彬吉

update

@@ -140,7 +140,7 @@ class UpdateSeoTdk extends Command @@ -140,7 +140,7 @@ class UpdateSeoTdk extends Command
140 ProjectServer::useProject($project_id); 140 ProjectServer::useProject($project_id);
141 $this->seo_tdk($project_id); 141 $this->seo_tdk($project_id);
142 } catch (\Exception $e) { 142 } catch (\Exception $e) {
143 - echo date('Y-m-d H:i:s') . ' error: ' . $project_id . '->' . $e->getMessage() . PHP_EOL; 143 + echo date('Y-m-d H:i:s') . ' line '. $e->getLine() .' error: ' . $project_id . '->' . $e->getMessage() . PHP_EOL;
144 } 144 }
145 echo date('Y-m-d H:i:s') . ' end: ' . $project_id . PHP_EOL; 145 echo date('Y-m-d H:i:s') . ' end: ' . $project_id . PHP_EOL;
146 } 146 }
@@ -289,7 +289,7 @@ class UpdateSeoTdk extends Command @@ -289,7 +289,7 @@ class UpdateSeoTdk extends Command
289 $projectOptimizeModel = new DeployOptimize(); 289 $projectOptimizeModel = new DeployOptimize();
290 $info = $projectOptimizeModel->read(['project_id' => $project_id], ['id', 'main_keywords']); 290 $info = $projectOptimizeModel->read(['project_id' => $project_id], ['id', 'main_keywords']);
291 if (!empty($info['main_keywords'])) { 291 if (!empty($info['main_keywords'])) {
292 - $main_keywords = explode(',', $info['main_keywords']); 292 + $main_keywords = explode(PHP_EOL, $info['main_keywords']);
293 //随机取 293 //随机取
294 shuffle($main_keywords); 294 shuffle($main_keywords);
295 $main_keywords = array_slice($main_keywords, 0, $num); 295 $main_keywords = array_slice($main_keywords, 0, $num);