Add failed routine to ResizeJob

This commit is contained in:
philipp lang 2021-10-30 21:45:12 +02:00
parent de0f4ad518
commit 8ad60f6ec5
1 changed files with 13 additions and 0 deletions

View File

@ -3,6 +3,8 @@
namespace Aweos\Resizer\Classes;
use Aweos\Resizer\Lib\MediaPath;
use Log;
use Throwable;
class ResizeJob
{
@ -12,4 +14,15 @@ class ResizeJob
list($file) = $params;
app(ImageResizer::class)->generate(new MediaPath($file));
}
public function failed($data, Throwable $e)
{
Log::error("Resizing of image failed", [
'message' => $e->getMessage(),
'exception' => $e,
'data' => $data,
]);
throw $e;
}
}