From aa32eb878074aebe43a51efaa548f76ac8e3c5a7 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 24 Dec 2022 02:01:30 -0700 Subject: [PATCH] Update DeletePipeline --- app/Jobs/DeletePipeline/DeleteRemoteStatusPipeline.php | 6 +++++- app/Jobs/MediaPipeline/MediaDeletePipeline.php | 4 ++++ app/Util/ActivityPub/Inbox.php | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Jobs/DeletePipeline/DeleteRemoteStatusPipeline.php b/app/Jobs/DeletePipeline/DeleteRemoteStatusPipeline.php index e2cfe398e..ccab18415 100644 --- a/app/Jobs/DeletePipeline/DeleteRemoteStatusPipeline.php +++ b/app/Jobs/DeletePipeline/DeleteRemoteStatusPipeline.php @@ -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(); diff --git a/app/Jobs/MediaPipeline/MediaDeletePipeline.php b/app/Jobs/MediaPipeline/MediaDeletePipeline.php index 2b7a5f733..6afba1701 100644 --- a/app/Jobs/MediaPipeline/MediaDeletePipeline.php +++ b/app/Jobs/MediaPipeline/MediaDeletePipeline.php @@ -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; diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index 0040908d2..2399a3801 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -681,7 +681,7 @@ class Inbox if(!$status) { return; } - DeleteRemoteStatusPipeline::dispatch($status)->onQueue('delete'); + DeleteRemoteStatusPipeline::dispatch($status)->onQueue('high'); return; break;