Fixed: Delete processed ResizeJob
This commit is contained in:
parent
d8dacc6546
commit
2ad9b01044
|
@ -11,13 +11,9 @@ class ResizeJob
|
||||||
|
|
||||||
public function fire($job, $params)
|
public function fire($job, $params)
|
||||||
{
|
{
|
||||||
try {
|
|
||||||
list($file) = $params;
|
list($file) = $params;
|
||||||
app(ImageResizer::class)->generate(new MediaPath($file), $params['update'] ?? false);
|
app(ImageResizer::class)->generate(new MediaPath($file), $params['update'] ?? false);
|
||||||
} catch (Throwable $e) {
|
$job->delete();
|
||||||
Log::error('Resizing of image failed. Message: "'.$e->getMessage().'" in file "'.$e->getFile().'" on line '.$e->getLine());
|
|
||||||
throw $e;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function failed($data, Throwable $e)
|
public function failed($data, Throwable $e)
|
||||||
|
|
Loading…
Reference in New Issue