rename($old, $new); app(CacheManager::class)->delete($old); unset ($old); unset ($new); $job->delete(); } public function failed($data, Throwable $e) { Log::error("Deleting of image failed", [ 'message' => $e->getMessage(), 'exception' => $e, 'data' => $data, ]); throw $e; } }