mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
refactor: use cached result
This commit is contained in:
parent
ba5a497b06
commit
f4c867a6a7
1 changed files with 6 additions and 1 deletions
|
|
@ -61,7 +61,12 @@ class GetContainersStatus
|
||||||
return ! $skip_these_applications->pluck('id')->contains($value->id);
|
return ! $skip_these_applications->pluck('id')->contains($value->id);
|
||||||
});
|
});
|
||||||
if ($this->containers === null) {
|
if ($this->containers === null) {
|
||||||
['containers' => $this->containers, 'containerReplicates' => $this->containerReplicates] = $this->server->getContainers();
|
if (isset($dockerInspectCache->data[$this->server->id]) && !$this->server->isSwarm()) {
|
||||||
|
$this->containers = collect($dockerInspectCache->data[$this->server->id]);
|
||||||
|
$this->containerReplicates = collect([]);
|
||||||
|
} else {
|
||||||
|
['containers' => $this->containers, 'containerReplicates' => $this->containerReplicates] = $this->server->getContainers();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($this->containers)) {
|
if (is_null($this->containers)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue