From 54adbeb0592d4a3b1ad1d66f48227ca09f0c8d7b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 19 Dec 2023 06:04:03 -0700 Subject: [PATCH] Update FeedRemoveDomainPipeline, make batchable --- app/Jobs/HomeFeedPipeline/FeedRemoveDomainPipeline.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Jobs/HomeFeedPipeline/FeedRemoveDomainPipeline.php b/app/Jobs/HomeFeedPipeline/FeedRemoveDomainPipeline.php index 2168ee054..018ea3794 100644 --- a/app/Jobs/HomeFeedPipeline/FeedRemoveDomainPipeline.php +++ b/app/Jobs/HomeFeedPipeline/FeedRemoveDomainPipeline.php @@ -2,6 +2,7 @@ namespace App\Jobs\HomeFeedPipeline; +use Illuminate\Bus\Batchable; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; @@ -15,7 +16,7 @@ use App\Services\HomeTimelineService; class FeedRemoveDomainPipeline implements ShouldQueue, ShouldBeUniqueUntilProcessing { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Batchable, Dispatchable, InteractsWithQueue, Queueable, SerializesModels; protected $pid; protected $domain; @@ -67,6 +68,11 @@ class FeedRemoveDomainPipeline implements ShouldQueue, ShouldBeUniqueUntilProces if(!config('exp.cached_home_timeline')) { return; } + + if ($this->batch()->cancelled()) { + return; + } + if(!$this->pid || !$this->domain) { return; }