From 3fafc2bcdc918195f19c338b2d2e4d70e9ae1b2a Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 16 Nov 2023 11:43:36 +0100 Subject: [PATCH] wip #6433 @0.5 --- .docker/dev/update.sh | 1 - app/Fluidbook/Farm.php | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.docker/dev/update.sh b/.docker/dev/update.sh index 90538f346..a8c404acb 100644 --- a/.docker/dev/update.sh +++ b/.docker/dev/update.sh @@ -1,7 +1,6 @@ #!/bin/sh cd /docker/fluidbook-toolbox-dev /home/toolbox/www/scripts/fixrights.sh -chown root:root /home/toolbox/dev/.docker/config/cron/host;ln -sf /home/toolbox/dev/.docker/config/cron/host /etc/cron.d/toolbox docker network create fluidbook-toolbox-dev docker compose down docker compose up -d diff --git a/app/Fluidbook/Farm.php b/app/Fluidbook/Farm.php index 1a1bf8646..f348806c7 100644 --- a/app/Fluidbook/Farm.php +++ b/app/Fluidbook/Farm.php @@ -15,22 +15,22 @@ class Farm { protected static $_outPDF = []; - //protected static $_forceServer = false; - protected static $_forceServer = 'alphaville'; + protected static $_forceServer = false; + //protected static $_forceServer = 'alphaville'; protected static $_farmServers = [ - ['name' => 'alphaville', 'host' => 'fluidbook-processfarm', 'port' => 9000, 'weight' => 24, 'region' => 'UE'], - ['name' => 'brazil', 'host' => 'brazil.cubedesigners.com', 'weight' => 2, 'region' => 'US'], + ['name' => 'alphaville', 'host' => 'fluidbook-processfarm', 'port' => 9000, 'weight' => 12, 'region' => 'UE'], + ['name' => 'brazil', 'host' => 'brazil.cubedesigners.com', 'weight' => 6, 'region' => 'US'], ['name' => 'clockwork', 'host' => 'clockwork.cubedesigners.com', 'weight' => 2, 'region' => 'UE'], ['name' => 'dracula', 'host' => 'dracula.cubedesigners.com', 'weight' => 6, 'region' => 'UE'], - ['name' => 'dobermann', 'host' => 'dobermann.cubedesigners.com', 'weight' => 2, 'region' => 'UE'], - ['name' => 'elephantman', 'host' => 'paris.cubedesigners.com', 'weight' => 1, 'region' => 'UE'], - ['name' => 'fastandfurious', 'host' => 'fastandfurious.cubedesigners.com', 'weight' => 1, 'region' => 'UE'], + ['name' => 'dobermann', 'host' => 'dobermann.cubedesigners.com', 'weight' => 6, 'region' => 'UE'], + ['name' => 'elephantman', 'host' => 'paris.cubedesigners.com', 'weight' => 2, 'region' => 'UE'], + ['name' => 'fastandfurious', 'host' => 'fastandfurious.cubedesigners.com', 'weight' => 2, 'region' => 'UE'], ['name' => 'godzilla', 'host' => 'godzilla.cubedesigners.com', 'weight' => 3, 'region' => 'UE'], ['name' => 'her', 'host' => 'her2.cubedesigners.com', 'weight' => 4, 'region' => 'UE'], ['name' => 'isleofdogs', 'host' => 'paris.cubedesigners.com', 'port' => 9458, 'weight' => 2, 'region' => 'UE'], ['name' => 'jumanji', 'host' => 'paris.cubedesigners.com', 'port' => 9459, 'weight' => 2, 'region' => 'UE'], ['name' => 'kingkong', 'host' => 'kingkong.cubedesigners.com', 'weight' => 6, 'region' => 'US'], - //['name' => 'matrix', 'host' => 'matrix.cubedesigners.com', 'weight' => 2, 'region' => 'UE'], + ['name' => 'nakedgun', 'host' => 'nakedgun.cubedesigners.com', 'weight' => 4, 'region' => 'UE'], ]; public static function forceServer($server) @@ -196,10 +196,10 @@ class Farm if (!$res) { if ($attempts > 0) { - Log::warning('Farm failure (' . $farmer['name'] . ') : ' . $output); + Log::warning('Farm failure (' . $farmer['name'] . ') : ' . $output . ' // ' . $log); return static::_getFile($params, $attempts - 1); } - throw new \Exception('Farm failure (' . $farmer['name'] . ') : ' . $output); + throw new \Exception('Farm failure (' . $farmer['name'] . ') : ' . $output . ' // ' . $log); } return $res; -- 2.39.5