feat: ship creator journey v2 and profile updates

This commit is contained in:
2026-04-12 21:42:07 +02:00
parent a2457f4e49
commit d5cff21ea2
335 changed files with 20147 additions and 1545 deletions

View File

@@ -7,6 +7,7 @@ namespace App\Observers;
use App\Jobs\RecComputeSimilarByBehaviorJob;
use App\Jobs\RecComputeSimilarHybridJob;
use App\Models\ArtworkFavourite;
use App\Services\Profile\CreatorJourneyService;
use App\Services\UserStatsService;
use Illuminate\Support\Facades\DB;
@@ -18,6 +19,7 @@ class ArtworkFavouriteObserver
{
public function __construct(
private readonly UserStatsService $userStats,
private readonly CreatorJourneyService $journeys,
) {}
public function created(ArtworkFavourite $favourite): void
@@ -25,6 +27,7 @@ class ArtworkFavouriteObserver
$creatorId = $this->creatorId($favourite->artwork_id);
if ($creatorId) {
$this->userStats->incrementFavoritesReceived($creatorId);
$this->journeys->requestRebuild($creatorId);
}
// §7.5 On-demand: recompute behavior similarity when artwork reaches threshold
@@ -36,6 +39,7 @@ class ArtworkFavouriteObserver
$creatorId = $this->creatorId($favourite->artwork_id);
if ($creatorId) {
$this->userStats->decrementFavoritesReceived($creatorId);
$this->journeys->requestRebuild($creatorId);
}
}