Fixed: Delete processed ResizeJob

This commit is contained in:
Philipp Lang 2021-11-28 21:53:23 +01:00
parent d8dacc6546
commit 2ad9b01044
1 changed files with 3 additions and 7 deletions

View File

@ -11,13 +11,9 @@ class ResizeJob
public function fire($job, $params)
{
try {
list($file) = $params;
app(ImageResizer::class)->generate(new MediaPath($file), $params['update'] ?? false);
} catch (Throwable $e) {
Log::error('Resizing of image failed. Message: "'.$e->getMessage().'" in file "'.$e->getFile().'" on line '.$e->getLine());
throw $e;
}
$job->delete();
}
public function failed($data, Throwable $e)