68 - Sync channel posts on setup for duplicate detection
This commit is contained in:
parent
c75a1c8cf0
commit
71e7611e65
2 changed files with 5 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
namespace App\Livewire;
|
namespace App\Livewire;
|
||||||
|
|
||||||
use App\Jobs\ArticleDiscoveryJob;
|
use App\Jobs\ArticleDiscoveryJob;
|
||||||
|
use App\Jobs\SyncChannelPostsJob;
|
||||||
use App\Models\Feed;
|
use App\Models\Feed;
|
||||||
use App\Models\Language;
|
use App\Models\Language;
|
||||||
use App\Models\PlatformAccount;
|
use App\Models\PlatformAccount;
|
||||||
|
|
@ -286,6 +287,9 @@ public function createChannel(): void
|
||||||
'updated_at' => now(),
|
'updated_at' => now(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// Sync existing posts from this channel for duplicate detection
|
||||||
|
SyncChannelPostsJob::dispatch($channel);
|
||||||
|
|
||||||
$this->nextStep();
|
$this->nextStep();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->formErrors['general'] = 'Failed to create channel. Please try again.';
|
$this->formErrors['general'] = 'Failed to create channel. Please try again.';
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@
|
||||||
'defaults' => [
|
'defaults' => [
|
||||||
'supervisor-1' => [
|
'supervisor-1' => [
|
||||||
'connection' => 'redis',
|
'connection' => 'redis',
|
||||||
'queue' => ['default', 'publishing', 'feed-discovery'],
|
'queue' => ['default', 'publishing', 'feed-discovery', 'sync'],
|
||||||
'balance' => 'auto',
|
'balance' => 'auto',
|
||||||
'autoScalingStrategy' => 'time',
|
'autoScalingStrategy' => 'time',
|
||||||
'maxProcesses' => 1,
|
'maxProcesses' => 1,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue