]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6433 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Nov 2023 10:43:36 +0000 (11:43 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Nov 2023 10:43:36 +0000 (11:43 +0100)
.docker/dev/update.sh
app/Fluidbook/Farm.php

index 90538f346116d53b2bbb51d1a792900d32ddf769..a8c404acb48fcb3ea8dd2b17fc88dc0a5925109f 100644 (file)
@@ -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
index 1a1bf86463a530a5b28eacfd992d79eb6ce65d03..f348806c76abea8daa480b5ba34a103b800ff6ee 100644 (file)
@@ -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;