fedi-feed-router/app/Jobs/RefreshArticlesJob.php
2025-07-03 21:17:13 +02:00

32 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";
}
}