1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 01:05:36 +00:00

Update DeletePipeline

This commit is contained in:
Daniel Supernault 2022-12-24 02:01:30 -07:00
parent e260109abe
commit aa32eb8780
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
3 changed files with 10 additions and 2 deletions

View file

@ -30,6 +30,10 @@ class DeleteRemoteStatusPipeline implements ShouldQueue
protected $status;
public $timeout = 300;
public $tries = 3;
public $maxExceptions = 1;
/**
* Create a new job instance.
*
@ -62,7 +66,7 @@ class DeleteRemoteStatusPipeline implements ShouldQueue
Media::whereStatusId($status->id)
->get()
->each(function($media) {
MediaDeletePipeline::dispatchNow($media);
MediaDeletePipeline::dispatch($media)->onQueue('mmo');
});
Mention::whereStatusId($status->id)->forceDelete();
Report::whereObjectType('App\Status')->whereObjectId($status->id)->delete();

View file

@ -17,6 +17,10 @@ class MediaDeletePipeline implements ShouldQueue
protected $media;
public $timeout = 300;
public $tries = 3;
public $maxExceptions = 1;
public function __construct(Media $media)
{
$this->media = $media;

View file

@ -681,7 +681,7 @@ class Inbox
if(!$status) {
return;
}
DeleteRemoteStatusPipeline::dispatch($status)->onQueue('delete');
DeleteRemoteStatusPipeline::dispatch($status)->onQueue('high');
return;
break;