作者 赵彬吉

update

@@ -73,7 +73,7 @@ class KeywordPageAiContent extends Command @@ -73,7 +73,7 @@ class KeywordPageAiContent extends Command
73 73
74 ProjectKeywordAiTask::finish($task->id, $update_rows); 74 ProjectKeywordAiTask::finish($task->id, $update_rows);
75 75
76 - // $update_rows && $this->sendNotify($project_id); 76 + $update_rows && $this->sendNotify($project_id);
77 77
78 } catch (ValidateException $e) { 78 } catch (ValidateException $e) {
79 echo getmypid() . ' ' . date('Y-m-d H:i:s') . 'line: ' . $e->getLine() . ' error: ' . $project_id . '->' . $e->getMessage() . PHP_EOL; 79 echo getmypid() . ' ' . date('Y-m-d H:i:s') . 'line: ' . $e->getLine() . ' error: ' . $project_id . '->' . $e->getMessage() . PHP_EOL;
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 namespace App\Console\Commands\Tdk; 3 namespace App\Console\Commands\Tdk;
4 4
5 use App\Models\Project\Project; 5 use App\Models\Project\Project;
  6 +use App\Models\Project\ProjectKeywordAiTask;
6 use App\Models\Project\ProjectUpdateTdk; 7 use App\Models\Project\ProjectUpdateTdk;
7 use Illuminate\Console\Command; 8 use Illuminate\Console\Command;
8 9
@@ -42,6 +43,16 @@ class UpdateSeoTdkCrontab extends Command @@ -42,6 +43,16 @@ class UpdateSeoTdkCrontab extends Command
42 dump($e->getMessage()); 43 dump($e->getMessage());
43 } 44 }
44 } 45 }
  46 +
  47 + $project_ids = Project::where('type', Project::TYPE_TWO)->where('tag_page_version', '>' ,1)->where('uptime', '<=', date('Y-m-d H:i:s'))->pluck('id')->toArray();
  48 + foreach ($project_ids as $project_id){
  49 + try {
  50 + ProjectKeywordAiTask::add_task($project_id);
  51 + }catch (\Exception $e){
  52 + dump($e->getMessage());
  53 + }
  54 + }
  55 +
45 } 56 }
46 57
47 } 58 }