|
...
|
...
|
@@ -63,7 +63,7 @@ class KeywordPageAiContent extends Command |
|
|
|
while (true) {
|
|
|
|
$task = ProjectKeywordAiTask::getPendingTask();
|
|
|
|
if (!$task) {
|
|
|
|
sleep(10);
|
|
|
|
sleep(60);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$project_id = $task->project_id;
|
|
...
|
...
|
@@ -78,7 +78,17 @@ class KeywordPageAiContent extends Command |
|
|
|
|
|
|
|
ProjectKeywordAiTask::finish($task->id, $update_rows);
|
|
|
|
|
|
|
|
$update_rows && $this->sendNotify($project_id);
|
|
|
|
// $update_rows && $this->sendNotify($project_id);
|
|
|
|
|
|
|
|
if($update_rows){
|
|
|
|
//缓存 在发送页面更新的项目数据 id
|
|
|
|
$notify_cache_key = "keyword_page_ai_content_notify_{$project_id}";
|
|
|
|
if(Redis::setnx($notify_cache_key, 1)){
|
|
|
|
Redis::expire($notify_cache_key, 120);
|
|
|
|
|
|
|
|
$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;
|
...
|
...
|
|