From af04a7ee6a069dbee25a91b75ba7bdb7e15212fd Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 13 Jun 2024 18:08:58 +0100 Subject: [PATCH] chore: dumps --- src/Orchestration/Adapter/DockerAPI.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Orchestration/Adapter/DockerAPI.php b/src/Orchestration/Adapter/DockerAPI.php index aaf8f74..e475d72 100644 --- a/src/Orchestration/Adapter/DockerAPI.php +++ b/src/Orchestration/Adapter/DockerAPI.php @@ -274,19 +274,15 @@ public function getStats(?string $container = null, array $filters = []): array $containerIds[] = $container; } - var_dump($containerIds); - $list = []; foreach ($containerIds as $containerId) { $result = $this->call('http://localhost/containers/'.$containerId.'/stats?stream=false', 'GET'); - if ($result['code'] !== 200) { + if ($result['code'] !== 200 || empty($result['response'])) { throw new Orchestration($result['response']); } - var_dump($result); - $stats = \json_decode($result['response'], true); // Calculate CPU usage