From 5e4917a612b31857bc8485240dca3834978038ad Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 25 Sep 2023 14:21:42 +0200 Subject: [PATCH] wip #6298 @0.5 --- app/Fluidbook/Farm.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/Fluidbook/Farm.php b/app/Fluidbook/Farm.php index 77297099b..4dd8b12e6 100644 --- a/app/Fluidbook/Farm.php +++ b/app/Fluidbook/Farm.php @@ -10,6 +10,7 @@ use hollodotme\FastCGI\Requests\PostRequest; use hollodotme\FastCGI\SocketConnections\NetworkSocket; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Log; +use Mockery\Exception; class Farm { @@ -150,7 +151,11 @@ class Farm if (file_exists($path)) { return $path; } - return self::_getFile($params, 0); + try { + return self::_getFile($params, 0); + } catch (Exception $e) { + return false; + } }); if ((!$res || !file_exists($res)) && $attempts > 0) { @@ -193,10 +198,10 @@ class Farm if (!$res) { if ($attempts > 0) { - Log::warning('Farm failure : ' . $output); + Log::warning('Farm failure ('.$farmer['name'].') : ' . $output); return static::_getFile($params, $attempts - 1); } - throw new \Exception('Farm failure : ' . $output); + throw new \Exception('Farm failure ('.$farmer['name'].') : ' . $output); } return $res; -- 2.39.5