33 lines
615 B
PHP
33 lines
615 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Jobs;
|
||
|
|
|
||
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||
|
|
use Illuminate\Foundation\Queue\Queueable;
|
||
|
|
|
||
|
|
class RefreshArticlesJob implements ShouldQueue
|
||
|
|
{
|
||
|
|
use Queueable;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Create a new job instance.
|
||
|
|
*/
|
||
|
|
public function __construct()
|
||
|
|
{
|
||
|
|
$this->onQueue('lemmy-posts');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Execute the job.
|
||
|
|
*/
|
||
|
|
public function handle(): void
|
||
|
|
{
|
||
|
|
echo "Starting article refresh job...\n";
|
||
|
|
|
||
|
|
// Call the article refresh command
|
||
|
|
\Artisan::call('article:refresh');
|
||
|
|
|
||
|
|
echo "Article refresh job completed!\n";
|
||
|
|
}
|
||
|
|
}
|