namespace App\Fluidbook;
-use App\Notifications\ToolboxNotification;
use Cubist\Util\Files\Files;
use Fluidbook\Tools\Jobs\ProcessFile;
use hollodotme\FastCGI\Client;
{
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'],
});
if ((!$res || !file_exists($res)) && $attempts > 0) {
+ Cache::forget($cachekey);
return self::getFileFromPDF($pdf, $page, $format, $resolution, $quality, $withText, $withGraphics, $version, $out, true, $attempts - 1);
}
$time = round(microtime(true) - $start, 4);
$log = '[' . $farmer['name'] . ']' . "\t" . date('Y-m-d H:i:s') . "\t" . $time . "\t" . implode('|', $params) . "\t($res)\t>>" . $output . "\n";
- error_log($log);
-
if (!$res) {
if ($attempts > 0) {
Log::warning('Farm failure ('.$farmer['name'].') : ' . $output);
$dockerSuffix = $env === 'production' ? '' : '-' . $env;
- $variables = ['$name' => $name.$dockerSuffix,
+ $variables = ['$name' => $name . $dockerSuffix,
'$portadminer' => rand(10000, 60000),
'$portmatomo' => rand(10000, 60000),
'$matomodbpassword' => Str::random(16),
if ($request->get('mysql', true)) {
$compose[] = 'mysql';
}
+ if ($request->get('redis', true)) {
+ $compose[] = 'redis';
+ }
if ($request->get('matomo', true)) {
$compose[] = 'matomo';
}
foreach ($infos as $k => $v) {
$notification .= '* ' . $k . ' : ' . $v . "\n";
}
- $notification.="\n";
+ $notification .= "\n";
Files::recursiveReplaceStringInDir($dir, $variables);
}