Add failed routine to ResizeJob
This commit is contained in:
parent
de0f4ad518
commit
8ad60f6ec5
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue