]> _ Git - fluidbook-toolbox.git/commitdiff
wip #5863 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 14 Apr 2023 17:41:35 +0000 (19:41 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 14 Apr 2023 17:41:35 +0000 (19:41 +0200)
.docker/images/php/Dockerfile
app/Console/Commands/FluidbookDocumentProcess.php

index c1951dd78415af415a6657f0a20d464f564298fa..7f676742e5afd2de08947a3737af052527fbfb28 100644 (file)
@@ -2,7 +2,7 @@
 # PHPDocker.io PHP 8.1 / CLI and FPM image #
 ############################################
 
-FROM ubuntu:latest AS cli
+FROM ubuntu:jammy AS cli
 
 WORKDIR "/application"
 
index 705322e260f3e5f3b317299f26a2a971f9deb14f..0de1153769901d79beffd2e8be66c95f04c335d8 100644 (file)
@@ -10,6 +10,7 @@ use App\Models\User;
 use Cubist\Backpack\Console\Commands\CubistCommand;
 use Cubist\Util\PHP;
 use Cubist\Util\Str;
+use Illuminate\Support\Facades\Log;
 
 class FluidbookDocumentProcess extends CubistCommand
 {
@@ -22,7 +23,12 @@ class FluidbookDocumentProcess extends CubistCommand
     public function handle()
     {
         PHP::neverStop(true);
-        $doc = FluidbookDocument::find($this->argument('id'));
+        $id=$this->argument('id');
+        $doc = FluidbookDocument::find($id);
+        if (null === $doc) {
+            Log::error('Document '.$id.' not found');
+            exit;
+        }
         $doc->clearAllFiles();
         $user = User::withoutGlobalScope('ownerclause')->where('id', $doc->owner)->first();
         $job = new FluidbookDocumentUpload(Str::random(), $doc, $user);