mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-19 21:11:26 +00:00
commit
1dd205ed06
3 changed files with 10 additions and 2 deletions
|
@ -30,6 +30,10 @@ class DeleteRemoteStatusPipeline implements ShouldQueue
|
||||||
|
|
||||||
protected $status;
|
protected $status;
|
||||||
|
|
||||||
|
public $timeout = 300;
|
||||||
|
public $tries = 3;
|
||||||
|
public $maxExceptions = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
|
@ -62,7 +66,7 @@ class DeleteRemoteStatusPipeline implements ShouldQueue
|
||||||
Media::whereStatusId($status->id)
|
Media::whereStatusId($status->id)
|
||||||
->get()
|
->get()
|
||||||
->each(function($media) {
|
->each(function($media) {
|
||||||
MediaDeletePipeline::dispatchNow($media);
|
MediaDeletePipeline::dispatch($media)->onQueue('mmo');
|
||||||
});
|
});
|
||||||
Mention::whereStatusId($status->id)->forceDelete();
|
Mention::whereStatusId($status->id)->forceDelete();
|
||||||
Report::whereObjectType('App\Status')->whereObjectId($status->id)->delete();
|
Report::whereObjectType('App\Status')->whereObjectId($status->id)->delete();
|
||||||
|
|
|
@ -17,6 +17,10 @@ class MediaDeletePipeline implements ShouldQueue
|
||||||
|
|
||||||
protected $media;
|
protected $media;
|
||||||
|
|
||||||
|
public $timeout = 300;
|
||||||
|
public $tries = 3;
|
||||||
|
public $maxExceptions = 1;
|
||||||
|
|
||||||
public function __construct(Media $media)
|
public function __construct(Media $media)
|
||||||
{
|
{
|
||||||
$this->media = $media;
|
$this->media = $media;
|
||||||
|
|
|
@ -681,7 +681,7 @@ class Inbox
|
||||||
if(!$status) {
|
if(!$status) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DeleteRemoteStatusPipeline::dispatch($status)->onQueue('delete');
|
DeleteRemoteStatusPipeline::dispatch($status)->onQueue('high');
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue