mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Merge pull request #4768 from pixelfed/staging
Update HashtagUnfollowPipeline
This commit is contained in:
commit
40651c036a
1 changed files with 1 additions and 26 deletions
|
@ -18,7 +18,7 @@ use App\Services\HashtagFollowService;
|
||||||
use App\Services\StatusService;
|
use App\Services\StatusService;
|
||||||
use App\Services\HomeTimelineService;
|
use App\Services\HomeTimelineService;
|
||||||
|
|
||||||
class HashtagUnfollowPipeline implements ShouldQueue, ShouldBeUniqueUntilProcessing
|
class HashtagUnfollowPipeline implements ShouldQueue
|
||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
|
@ -30,31 +30,6 @@ class HashtagUnfollowPipeline implements ShouldQueue, ShouldBeUniqueUntilProcess
|
||||||
public $maxExceptions = 1;
|
public $maxExceptions = 1;
|
||||||
public $failOnTimeout = true;
|
public $failOnTimeout = true;
|
||||||
|
|
||||||
/**
|
|
||||||
* The number of seconds after which the job's unique lock will be released.
|
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
*/
|
|
||||||
public $uniqueFor = 3600;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the unique ID for the job.
|
|
||||||
*/
|
|
||||||
public function uniqueId(): string
|
|
||||||
{
|
|
||||||
return 'hfp:hashtag:unfollow:' . $this->hid . ':' . $this->pid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the middleware the job should pass through.
|
|
||||||
*
|
|
||||||
* @return array<int, object>
|
|
||||||
*/
|
|
||||||
public function middleware(): array
|
|
||||||
{
|
|
||||||
return [(new WithoutOverlapping("hfp:hashtag:unfollow:{$this->hid}:{$this->pid}"))->shared()->dontRelease()];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue