diff --git a/app/Livewire/Onboarding.php b/app/Livewire/Onboarding.php index 606df38..5e05ff9 100644 --- a/app/Livewire/Onboarding.php +++ b/app/Livewire/Onboarding.php @@ -3,6 +3,7 @@ namespace App\Livewire; use App\Jobs\ArticleDiscoveryJob; +use App\Jobs\SyncChannelPostsJob; use App\Models\Feed; use App\Models\Language; use App\Models\PlatformAccount; @@ -286,6 +287,9 @@ public function createChannel(): void 'updated_at' => now(), ]); + // Sync existing posts from this channel for duplicate detection + SyncChannelPostsJob::dispatch($channel); + $this->nextStep(); } catch (\Exception $e) { $this->formErrors['general'] = 'Failed to create channel. Please try again.'; diff --git a/config/horizon.php b/config/horizon.php index 34761ea..c8bff54 100644 --- a/config/horizon.php +++ b/config/horizon.php @@ -182,7 +182,7 @@ 'defaults' => [ 'supervisor-1' => [ 'connection' => 'redis', - 'queue' => ['default', 'publishing', 'feed-discovery'], + 'queue' => ['default', 'publishing', 'feed-discovery', 'sync'], 'balance' => 'auto', 'autoScalingStrategy' => 'time', 'maxProcesses' => 1,