fedi-feed-router/app/Jobs/RefreshArticlesJob.php

33 lines
615 B
PHP
Raw Normal View History

2025-07-03 21:16:22 +02:00
<?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";
}
}