Update AISerpGenArticleJob.php

This commit is contained in:
charlesteh
2023-10-03 13:05:03 +08:00
committed by GitHub
parent 78736a9d32
commit 2ba58d5e20

View File

@@ -30,10 +30,10 @@ public function __construct()
*/ */
public function handle(): void public function handle(): void
{ {
$category = Category::orderBy('serp_at', 'asc') $category = Category::orderByRaw('ISNULL(serp_at) DESC')
->orWhereNull('serp_at') ->orderBy('serp_at', 'asc')
->first(); ->first();
$news_serp_result = GetNewsSerpTask::handle($category, 'US'); $news_serp_result = GetNewsSerpTask::handle($category, 'US');
if (is_null($news_serp_result)) { if (is_null($news_serp_result)) {