作者 赵彬吉

update

... ... @@ -73,7 +73,7 @@ class KeywordPageAiContent extends Command
ProjectKeywordAiTask::finish($task->id, $update_rows);
// $update_rows && $this->sendNotify($project_id);
$update_rows && $this->sendNotify($project_id);
} catch (ValidateException $e) {
echo getmypid() . ' ' . date('Y-m-d H:i:s') . 'line: ' . $e->getLine() . ' error: ' . $project_id . '->' . $e->getMessage() . PHP_EOL;
... ...
... ... @@ -3,6 +3,7 @@
namespace App\Console\Commands\Tdk;
use App\Models\Project\Project;
use App\Models\Project\ProjectKeywordAiTask;
use App\Models\Project\ProjectUpdateTdk;
use Illuminate\Console\Command;
... ... @@ -42,6 +43,16 @@ class UpdateSeoTdkCrontab extends Command
dump($e->getMessage());
}
}
$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();
foreach ($project_ids as $project_id){
try {
ProjectKeywordAiTask::add_task($project_id);
}catch (\Exception $e){
dump($e->getMessage());
}
}
}
}
... ...