# PHPDocker.io PHP 8.1 / CLI and FPM image #
############################################
-FROM ubuntu:latest AS cli
+FROM ubuntu:jammy AS cli
WORKDIR "/application"
use Cubist\Backpack\Console\Commands\CubistCommand;
use Cubist\Util\PHP;
use Cubist\Util\Str;
+use Illuminate\Support\Facades\Log;
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);