From 1cf6452aec5a4bc62152d1612e5a67952e85ae90 Mon Sep 17 00:00:00 2001 From: Martin Zurowietz Date: Fri, 24 Jan 2025 16:26:11 +0100 Subject: [PATCH] Add deleteWhenMissingModels to job References #1054 --- app/Jobs/CloneVideoThumbnails.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Jobs/CloneVideoThumbnails.php b/app/Jobs/CloneVideoThumbnails.php index 5f360db7c..16a05a560 100644 --- a/app/Jobs/CloneVideoThumbnails.php +++ b/app/Jobs/CloneVideoThumbnails.php @@ -26,10 +26,18 @@ class CloneVideoThumbnails extends Job implements ShouldQueue /** * Cloned video of cloned volume + * * @var Video */ public $video; + /** + * Ignore this job if the video does not exist any more. + * + * @var bool + */ + protected $deleteWhenMissingModels = true; + public function __construct(Video $video, String $prefix) { $this->video = $video;