From 49d825f5b2c4daeaeb6ce37b0742d131c61b825e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 12 Jan 2019 15:21:48 -0700 Subject: [PATCH] Update ImageOptimizePipeline --- app/Jobs/ImageOptimizePipeline/ImageOptimize.php | 7 +++++++ app/Jobs/ImageOptimizePipeline/ImageResize.php | 7 +++++++ app/Jobs/ImageOptimizePipeline/ImageThumbnail.php | 7 +++++++ app/Jobs/ImageOptimizePipeline/ImageUpdate.php | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/app/Jobs/ImageOptimizePipeline/ImageOptimize.php b/app/Jobs/ImageOptimizePipeline/ImageOptimize.php index 2fdd439c6..0a4712bf4 100644 --- a/app/Jobs/ImageOptimizePipeline/ImageOptimize.php +++ b/app/Jobs/ImageOptimizePipeline/ImageOptimize.php @@ -15,6 +15,13 @@ class ImageOptimize implements ShouldQueue protected $media; + /** + * Delete the job if its models no longer exist. + * + * @var bool + */ + public $deleteWhenMissingModels = true; + /** * Create a new job instance. * diff --git a/app/Jobs/ImageOptimizePipeline/ImageResize.php b/app/Jobs/ImageOptimizePipeline/ImageResize.php index f7dd622b6..9d8a3c319 100644 --- a/app/Jobs/ImageOptimizePipeline/ImageResize.php +++ b/app/Jobs/ImageOptimizePipeline/ImageResize.php @@ -16,6 +16,13 @@ class ImageResize implements ShouldQueue protected $media; + /** + * Delete the job if its models no longer exist. + * + * @var bool + */ + public $deleteWhenMissingModels = true; + /** * Create a new job instance. * diff --git a/app/Jobs/ImageOptimizePipeline/ImageThumbnail.php b/app/Jobs/ImageOptimizePipeline/ImageThumbnail.php index 601c010b3..93f35a3d1 100644 --- a/app/Jobs/ImageOptimizePipeline/ImageThumbnail.php +++ b/app/Jobs/ImageOptimizePipeline/ImageThumbnail.php @@ -17,6 +17,13 @@ class ImageThumbnail implements ShouldQueue protected $media; + /** + * Delete the job if its models no longer exist. + * + * @var bool + */ + public $deleteWhenMissingModels = true; + /** * Create a new job instance. * diff --git a/app/Jobs/ImageOptimizePipeline/ImageUpdate.php b/app/Jobs/ImageOptimizePipeline/ImageUpdate.php index 173dd9f31..37a51cb88 100644 --- a/app/Jobs/ImageOptimizePipeline/ImageUpdate.php +++ b/app/Jobs/ImageOptimizePipeline/ImageUpdate.php @@ -23,6 +23,13 @@ class ImageUpdate implements ShouldQueue 'image/png', ]; + /** + * Delete the job if its models no longer exist. + * + * @var bool + */ + public $deleteWhenMissingModels = true; + /** * Create a new job instance. *