]> _ Git - odl.git/commitdiff
wip #4666 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 8 Sep 2021 15:51:22 +0000 (17:51 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 8 Sep 2021 15:51:22 +0000 (17:51 +0200)
app/Jobs/ProcessFluidbook.php
composer.lock

index ce4ed6f4da640323c5187f527782e4f90700fdba..c0dc92eec58e33c0f97ec98e7c8e81de0a07e2c9 100644 (file)
@@ -3,7 +3,10 @@
 namespace App\Jobs;
 
 use Cubist\Util\CommandLine;
+use Cubist\Util\Files\Files;
+use Cubist\Util\PHP;
 use Fluidbook\Tools\FluidbookTools;
+use Fluidbook\Tools\Jobs\ProcessFile;
 use Fluidbook\Tools\PDF\Document;
 use Illuminate\Bus\Queueable;
 use Illuminate\Contracts\Queue\ShouldBeUnique;
@@ -42,6 +45,9 @@ class ProcessFluidbook implements ShouldQueue, ShouldBeUnique
     public function handle()
     {
         $sync = ($this->job instanceof SyncJob);
+        if ($sync) {
+            PHP::neverStop(false);
+        }
 
         start_measure('Process Fluidbook');
         $this->resetOutput();
@@ -65,12 +71,11 @@ class ProcessFluidbook implements ShouldQueue, ShouldBeUnique
     public function processPages($sync = false)
     {
         start_measure('Process Pages');
-        $out = storage_path('fluidbook/convert/' . $this->in->getHash());
-        $this->in->processPages($out, [
-            ['format' => 'jpg', 'resolution' => '36', 'withTexts' => true, 'withGraphics' => true],
-            ['format' => 'jpg', 'resolution' => '150', 'withTexts' => false, 'withGraphics' => true],
-            // ['format' => 'jpg', 'resolution' => '300', 'withTexts' => false, 'withGraphics' => true],
-            ['format' => 'svg', 'resolution' => '300', 'withTexts' => true, 'withGraphics' => false],
+        $out = storage_path('fluidbook/convert/' . $this->in->getHash() . '/');
+        Files::mkdir($out);
+        $this->in->processPages($out, [new ProcessFile('jpg', 'thumb'),
+            new ProcessFile('jpg', 150, false, true),
+            new ProcessFile('svg', 300, true, false),
         ], $sync);
         stop_measure('Process Pages');
 
index 47eddfd9ac92178adf777f1d2521cea884aa79ce..d4466e3acfac6638222b97233918fa16e3c1634f 100644 (file)
             "source": {
                 "type": "git",
                 "url": "git://git.cubedesigners.com/fluidbook_tools.git",
-                "reference": "fbcd179c04e2bd1061307bcabda70a9756b4217b"
+                "reference": "21176c4e485d13bdb24c43cf3c038539df01e01d"
             },
             "dist": {
                 "type": "tar",
-                "url": "https://composer.cubedesigners.com/dist/fluidbook/tools/fluidbook-tools-dev-master-d6dc02.tar",
-                "reference": "fbcd179c04e2bd1061307bcabda70a9756b4217b",
-                "shasum": "88e7797805be96ed7a2ba0842029d42f1466d5b4"
+                "url": "https://composer.cubedesigners.com/dist/fluidbook/tools/fluidbook-tools-dev-master-0bc471.tar",
+                "reference": "21176c4e485d13bdb24c43cf3c038539df01e01d",
+                "shasum": "15f3ddd393e9e20dfc589c933b27e8a0e830f788"
             },
             "require": {
+                "barryvdh/laravel-debugbar": "^3.6",
                 "cubist/util": "dev-master",
                 "ext-dom": "*",
                 "ext-gd": "*",
                 }
             ],
             "description": "Fluidbook Tools",
-            "time": "2021-09-06T17:21:56+00:00"
+            "time": "2021-09-08T14:14:45+00:00"
         },
         {
             "name": "fruitcake/laravel-cors",
         },
         {
             "name": "laravel/framework",
-            "version": "v8.58.0",
+            "version": "v8.60.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laravel/framework.git",
-                "reference": "1b819bf99d87bd543a4d4895e5b3350f61ea7a23"
+                "reference": "44f16a31a1d4ac8a51605550d7796e2273984a48"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laravel/framework/zipball/1b819bf99d87bd543a4d4895e5b3350f61ea7a23",
-                "reference": "1b819bf99d87bd543a4d4895e5b3350f61ea7a23",
+                "url": "https://api.github.com/repos/laravel/framework/zipball/44f16a31a1d4ac8a51605550d7796e2273984a48",
+                "reference": "44f16a31a1d4ac8a51605550d7796e2273984a48",
                 "shasum": ""
             },
             "require": {
                 "issues": "https://github.com/laravel/framework/issues",
                 "source": "https://github.com/laravel/framework"
             },
-            "time": "2021-08-31T13:55:57+00:00"
+            "time": "2021-09-08T13:37:21+00:00"
         },
         {
             "name": "laravel/sanctum",