From 7f6a3b9a668b767a769839467097d37b41844169 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 20 Jul 2023 11:45:24 +0200 Subject: [PATCH] wip #6112 @0.5 --- app/src/ProcessFile.php | 4 +++- app/src/ProcessToolboxDocumentFile.php | 4 ++-- update | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/ProcessFile.php b/app/src/ProcessFile.php index 1c55cfb..ca16608 100644 --- a/app/src/ProcessFile.php +++ b/app/src/ProcessFile.php @@ -29,6 +29,8 @@ class ProcessFile extends \Fluidbook\Tools\Jobs\ProcessFile { public function __construct($out, $page, $resolutionRatio, $mobileRatio, $format = 'jpg', $resolution = 150, $quality = 85, $withGraphics = true, $withTexts = true, $version = 'html', $force = false) { + error_log('Begin process file : [' . $out . ',' . $page . ']'); + if (stristr($out, 'usstorage')) { $this->setRegion('US'); } @@ -136,7 +138,7 @@ class ProcessFile extends \Fluidbook\Tools\Jobs\ProcessFile { public function getPdf(): string|null { $res = Files::firstThatExists($this->getOut() . '/crop.pdf', $this->getOut() . '/fixed.pdf', $this->getOut() . '/original.pdf'); - if(null===$res) { + if (null === $res) { echo 'no pdf in ' . $this->getOut(); } return $res; diff --git a/app/src/ProcessToolboxDocumentFile.php b/app/src/ProcessToolboxDocumentFile.php index 68a10e4..af611dd 100644 --- a/app/src/ProcessToolboxDocumentFile.php +++ b/app/src/ProcessToolboxDocumentFile.php @@ -11,9 +11,9 @@ class ProcessToolboxDocumentFile extends ProcessFile { public function process() { $res = $this->getPath($this->isForce()); if (!file_exists($res)) { - error_log($res . 'not found :('); + error_log($res . ' not found :('); }else{ - error_log($res . 'ok :)'); + error_log($res . ' ok :)'); } return $res; } diff --git a/update b/update index 695faa0..a59a41e 100755 --- a/update +++ b/update @@ -8,6 +8,7 @@ git stash git pull origin master chmod 755 /docker/fluidbook-processfarm/app/bin/* chmod 755 /docker/fluidbook-processfarm/app/vendor/cubist/pdf/resources/tools/fwstk.sh +chmod 755 /docker/fluidbook-processfarm/app/vendor/fluidbook/tools/resources/tools/svgcleaner/svgcleaner chmod 755 /docker/fluidbook-processfarm/ssh chmod 600 /docker/fluidbook-processfarm/ssh/id_rsa DOCKER_BUILDKIT=1 docker compose build -- 2.39.5