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