containerName = generateApplicationContainerName($application->uuid, $pullRequestId); } public function uniqueId(): string { return $this->containerName; } public function handle(): void { try { $status = getApplicationContainerStatus(application: $this->application); if ($this->application->status === 'running' && $status !== 'running') { // $this->application->environment->project->team->notify(new StatusChanged($this->application)); } if ($this->pullRequestId !== 0) { $preview = ApplicationPreview::findPreviewByApplicationAndPullId($this->application->id, $this->pullRequestId); $preview->status = $status; $preview->save(); } else { $this->application->status = $status; $this->application->save(); } } catch (\Exception $th) { ray($th->getMessage()); throw $th; } } }