Upload beautify

This commit is contained in:
2026-02-14 15:14:12 +01:00
parent e129618910
commit 79192345e3
249 changed files with 24436 additions and 1021 deletions

View File

@@ -0,0 +1,47 @@
<?php
declare(strict_types=1);
namespace App\Jobs;
use App\Services\Recommendations\PersonalizedFeedService;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
final class RegenerateUserRecommendationCacheJob implements ShouldQueue
{
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;
public int $tries = 3;
/** @var array<int, int> */
public array $backoff = [10, 60, 180];
public function __construct(
public readonly int $userId,
public readonly string $algoVersion
) {
}
public function handle(PersonalizedFeedService $feedService): void
{
try {
$feedService->regenerateCacheForUser($this->userId, $this->algoVersion);
} catch (\Throwable $e) {
Log::error('RegenerateUserRecommendationCacheJob failed', [
'user_id' => $this->userId,
'algo_version' => $this->algoVersion,
'error' => $e->getMessage(),
]);
throw $e;
}
}
}