['name' => 'alphaville', 'host' => 'fluidbook-processfarm', 'port' => 9000, 'weight' => 24, 'region' => 'UE'],
['name' => 'brazil', 'host' => 'brazil.cubedesigners.com', 'weight' => 2, 'region' => 'US'],
['name' => 'clockwork', 'host' => 'clockwork.cubedesigners.com', 'weight' => 2, 'region' => 'UE'],
- ['name' => 'dracula', 'host' => 'dracula.cubedesigners.com', 'weight' => 3, 'region' => 'UE'],
+ ['name' => 'dracula', 'host' => 'dracula.cubedesigners.com', 'weight' => 6, 'region' => 'UE'],
['name' => 'elephantman', 'host' => 'paris.cubedesigners.com', 'weight' => 1, 'region' => 'UE'],
['name' => 'fastandfurious', 'host' => 'fastandfurious.cubedesigners.com', 'weight' => 1, 'region' => 'UE'],
['name' => 'godzilla', 'host' => 'godzilla.cubedesigners.com', 'weight' => 3, 'region' => 'UE'],
return self::_getFile($params);
}
-
public static function getFileFromPDF($pdf, $page, $format, $resolution, $quality, $withText = true, $withGraphics = true, $version = 'html', $out = null, $force = false)
{
if (null === $out) {
return $res;
}
+ /**
+ * @throws \Exception
+ */
protected static function _getFile($params, $attempts = 3)
{
$start = microtime(true);
error_log($log);
- if (!$res && $attempts > 0) {
- return static::_getFile($params, $attempts - 1);
+ if (!$res) {
+ if ($attempts > 0) {
+ Log::warning('Farm failure : ' . $log);
+ return static::_getFile($params, $attempts - 1);
+ }
+ throw new \Exception('Farm failure : ' . $log);
}
return $res;
sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -o uid=1002 -o gid=33 -o allow_other fluidbook@clockwork.cubedesigners.com:/data/fluidbook/hosting /mnt/hosting
fi
+mkdir -p /application/protected/fluidbookpublication/docs
+if mountpoint -q "/application/protected/fluidbookpublication/docs"; then
+ :
+else
+ sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -o uid=1002 -o gid=33 -o allow_other root@godzilla.cubedesigners.com:/data/fluidbook/docs /application/protected/fluidbookpublication/docs
+fi
+
# Launch PHP
/usr/sbin/php-fpm8.2 -O