diff --git a/app/Http/Livewire/Project/Application/Previews.php b/app/Http/Livewire/Project/Application/Previews.php index f56ce2f66..cb908ff2a 100644 --- a/app/Http/Livewire/Project/Application/Previews.php +++ b/app/Http/Livewire/Project/Application/Previews.php @@ -69,11 +69,11 @@ public function stop(int $pull_request_id) ray('Stopping container: ' . $container_name); instant_remote_process(["docker rm -f $container_name"], $this->application->destination->server, throwError: false); - dispatch(new ContainerStatusJob( - application: $this->application, - container_name: $container_name, - pull_request_id: $pull_request_id - )); + $found = ApplicationPreview::where('application_id', $this->application->id)->where('pull_request_id', $pull_request_id)->first(); + if ($found) { + $found->delete(); + } + $this->application->refresh(); } catch (\Throwable $th) { return general_error_handler($th, $this); } diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 994f61221..1d4a077c2 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -594,7 +594,7 @@ private function importing_git_repository() $commands = [$this->execute_in_builder($git_clone_command)]; if ($this->pull_request_id) { - $commands[] = $this->execute_in_builder("cd {$this->workdir} && git fetch origin pull/{$this->pull_request_id}/head:$pr_branch_name && git checkout $pr_branch_name"); + $commands[] = $this->execute_in_builder("cd {$this->workdir} && git fetch origin pull/{$this->pull_request_id}/head:$pr_branch_name >/dev/null 2>&1 && git checkout $pr_branch_name >/dev/null 2>&1"); } return $commands; } else {