This commit is contained in:
Andras Bacsai
2023-06-08 10:55:50 +02:00
parent b3cdd7df3c
commit 0add4155ab
9 changed files with 41 additions and 38 deletions

View File

@@ -35,6 +35,7 @@ class ApplicationContainerStatusJob implements ShouldQueue, ShouldBeUnique
{
try {
$status = get_container_status(server: $this->application->destination->server, container_id: $this->container_name, throwError: false);
ray('ApplicationContainerStatusJob', $status);
if ($this->pull_request_id) {
$preview = ApplicationPreview::findPreviewByApplicationAndPullId($this->application->id, $this->pull_request_id);
$preview->status = $status;
@@ -47,11 +48,4 @@ class ApplicationContainerStatusJob implements ShouldQueue, ShouldBeUnique
Log::error($e->getMessage());
}
}
protected function check_container_status()
{
if ($this->application->destination->server) {
$this->application->status = get_container_status(server: $this->application->destination->server, container_id: $this->application->uuid);
$this->application->save();
}
}
}