Update (rss)

This commit is contained in:
2023-12-03 02:27:30 +08:00
parent 315ddd0ded
commit 497d7d6517
3 changed files with 13 additions and 9 deletions

View File

@@ -46,13 +46,15 @@ public function handle(): void
$rss_post->post_domain = get_domain_from_url($raw_post->link);
$rss_post->source = $raw_post->source;
$rss_post->source_url = $raw_post->source_url;
$rss_post->body = $raw_post->description;
$rss_post->title = remove_newline($raw_post->title);
$rss_post->slug = str_slug(remove_newline($raw_post->title));
$rss_post->published_at = $raw_post->date;
$rss_post->status = 'draft';
if ($rss_post->save()) {
CrawlRssPostJob::dispatch($rss_post->id)->onConnection('default')->onQueue('default');
//CrawlRssPostJob::dispatch($rss_post->id)->onConnection('default')->onQueue('default');
ParseRssPostMetadataJob::dispatch($rss_post->id)->onConnection('default')->onQueue('default');
}
}