From fe794ab0940b8c5ee91b7b7e217563bd64cdfee4 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Wed, 16 Feb 2022 03:15:07 +0100 Subject: [PATCH] Move ResizeJob to Jobs dir --- Plugin.php | 2 +- classes/ResizeJob.php | 35 ----------------------------------- console/ResizeMake.php | 2 +- jobs/ResizeJob.php | 1 + 4 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 classes/ResizeJob.php diff --git a/Plugin.php b/Plugin.php index f447435..8f6b886 100644 --- a/Plugin.php +++ b/Plugin.php @@ -5,7 +5,7 @@ namespace Aweos\Resizer; use Aweos\Resizer\Classes\CacheManager; use Aweos\Resizer\Classes\FileObserver; use Aweos\Resizer\Classes\ImageResizer; -use Aweos\Resizer\Classes\ResizeJob; +use Aweos\Resizer\Jobs\ResizeJob; use Aweos\Resizer\Console\ResizeMake; use Aweos\Resizer\Console\ResizePurge; use Aweos\Resizer\Jobs\DeleteJob; diff --git a/classes/ResizeJob.php b/classes/ResizeJob.php deleted file mode 100644 index 28d6b1e..0000000 --- a/classes/ResizeJob.php +++ /dev/null @@ -1,35 +0,0 @@ -generate($media, $params['update'] ?? false); - app(CacheManager::class)->delete($media); - unset ($media); - - $job->delete(); - } - - public function failed($data, Throwable $e) - { - Log::error("Resizing of image failed", [ - 'message' => $e->getMessage(), - 'exception' => $e, - 'data' => $data, - ]); - - throw $e; - } -} diff --git a/console/ResizeMake.php b/console/ResizeMake.php index 66f7fad..5c24db6 100644 --- a/console/ResizeMake.php +++ b/console/ResizeMake.php @@ -1,7 +1,7 @@