forked from mirror/pixelfed
Update FeedRemoveDomainPipeline, make batchable
This commit is contained in:
parent
9d621108b0
commit
54adbeb059
1 changed files with 7 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Jobs\HomeFeedPipeline;
|
namespace App\Jobs\HomeFeedPipeline;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Batchable;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Contracts\Queue\ShouldBeUnique;
|
use Illuminate\Contracts\Queue\ShouldBeUnique;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
@ -15,7 +16,7 @@ use App\Services\HomeTimelineService;
|
||||||
|
|
||||||
class FeedRemoveDomainPipeline implements ShouldQueue, ShouldBeUniqueUntilProcessing
|
class FeedRemoveDomainPipeline implements ShouldQueue, ShouldBeUniqueUntilProcessing
|
||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Batchable, Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
protected $pid;
|
protected $pid;
|
||||||
protected $domain;
|
protected $domain;
|
||||||
|
@ -67,6 +68,11 @@ class FeedRemoveDomainPipeline implements ShouldQueue, ShouldBeUniqueUntilProces
|
||||||
if(!config('exp.cached_home_timeline')) {
|
if(!config('exp.cached_home_timeline')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->batch()->cancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!$this->pid || !$this->domain) {
|
if(!$this->pid || !$this->domain) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue