From fcd187eebaa4d14c094bf50dd6f332226ba9436a Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 19 Jun 2023 18:19:53 +0200 Subject: [PATCH] try #6060 @0.75 --- app/Fluidbook/Compiler/Compiler.php | 1 + app/Fluidbook/Farm.php | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/Fluidbook/Compiler/Compiler.php b/app/Fluidbook/Compiler/Compiler.php index a95040a19..53b29a476 100644 --- a/app/Fluidbook/Compiler/Compiler.php +++ b/app/Fluidbook/Compiler/Compiler.php @@ -1915,6 +1915,7 @@ class Compiler extends Base implements CompilerInterface protected function writeImages() { + set_time_limit(0); switch ($this->fluidbookSettings->mobileVersion) { case 'html5-desktop': $this->backgroundsPrefix = array(true, false); diff --git a/app/Fluidbook/Farm.php b/app/Fluidbook/Farm.php index e2f500294..f7c9fd67f 100644 --- a/app/Fluidbook/Farm.php +++ b/app/Fluidbook/Farm.php @@ -2,6 +2,7 @@ namespace App\Fluidbook; +use App\Notifications\ToolboxNotification; use Cubist\Util\Files\Files; use hollodotme\FastCGI\Client; use hollodotme\FastCGI\Requests\PostRequest; @@ -78,13 +79,13 @@ class Farm } - public static function getFCGIConnexion(array $farm, $timeout = 240): NetworkSocket + public static function getFCGIConnexion(array $farm, $timeout = 600): NetworkSocket { $timeout *= 1000; return new NetworkSocket($farm['host'], $farm['port'] ?? 9457, $timeout, $timeout); } - public static function sendRequest($farmer, $url, $params = [], $timeout = 240) + public static function sendRequest($farmer, $url, $params = [], $timeout = 600) { set_time_limit(0); $client = new Client(); @@ -155,7 +156,10 @@ class Farm $output = self::sendRequest($farmer, 'process.php', $params); } catch (\Exception $e) { Log::error('Farm server error ' . $farmer['name'] . ' : ' . json_encode($params) . ' : ' . $e->getMessage()); - exit; + if ($attempts > 0) { + return static::_getFile($params, $attempts - 1); + } + return false; } $output = trim($output); -- 2.39.5