Add (news bites)

This commit is contained in:
2023-11-21 19:18:11 +08:00
parent 2e38a4120c
commit 3210563e42
37 changed files with 1581 additions and 153 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class BrowseRSSPostJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $timeout = 20;
protected $hours;
/**
* Create a new job instance.
*/
public function __construct($hours)
{
$this->hours = $hours;
}
/**
* Execute the job.
*/
public function handle(): void
{
$rss_urls = config('platform.global.rss');
foreach ($rss_urls as $rss_url) {
BrowseSingleRSSJob::dispatch($rss_url, $this->hours);
}
}
}