This commit is contained in:
Doar Mihai
2026-04-03 00:39:57 +03:00
parent 4e6b636787
commit 2b930a0636
6 changed files with 868 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Console\Commands;
use App\Services\JobEnrichmentService;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
#[Signature('jobs:enrich {--batch=100}')]
#[Description('Enrich job listings with additional data (categories, experience levels, etc.)')]
class EnrichJobs extends Command
{
public function __construct(
private JobEnrichmentService $enrichmentService
) {
parent::__construct();
}
/**
* Execute the console command.
*/
public function handle(): int
{
$batchSize = (int) $this->option('batch');
$this->info('Enriching job listings...');
$this->newLine();
$enrichedCount = $this->enrichmentService->enrichJobs($batchSize);
$this->newLine();
$this->info("Enriched {$enrichedCount} jobs successfully!");
return self::SUCCESS;
}
}