From a53002ed4deb59d12d2fde53db225ddd3d281df0 Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Wed, 22 Oct 2025 15:48:58 +0200 Subject: [PATCH] New version 1.2.1 --- CHANGELOG.md | 5 +++++ src/Command/ExecutePendingTracesCommand.php | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff371eb..e3d49e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Changelog +## [1.2.1] - 2025-10-22 +### Fixed +- Se ha corregido un error en el commando que se encarga de ejecutar tareas pendientes. + +--- ## [1.2.0] - 2025-10-21 ### Added - Nueva funcionalidad para poder eliminar equipos a la vez. Nuevo endpoint desde "Client". diff --git a/src/Command/ExecutePendingTracesCommand.php b/src/Command/ExecutePendingTracesCommand.php index 8a9c6ae..91919d4 100644 --- a/src/Command/ExecutePendingTracesCommand.php +++ b/src/Command/ExecutePendingTracesCommand.php @@ -303,22 +303,29 @@ class ExecutePendingTracesCommand extends Command { $client = $trace->getClient(); - if (!isset($input['imageImageRepository'])) { - throw new \Exception("ImageImageRepository UUID not found in trace input"); + if (!isset($input['imageImageRepository']) && !isset($input['image'])) { + throw new \Exception("ImageImageRepository UUID or image UUID not found in trace input for deploy image"); } $imageImageRepository = $this->entityManager->getRepository(ImageImageRepository::class) - ->findOneBy(['uuid' => $input['imageImageRepository']]); + ->findOneBy(['uuid' => $input['imageImageRepository'] ?? $input['image']]); if (!$imageImageRepository) { throw new \Exception("ImageImageRepository not found with UUID: {$input['imageImageRepository']}"); } + $diskNumber = isset($input['diskNumber']) ? $input['diskNumber'] : $input['numDisk']; + $partitionNumber = isset($input['partitionNumber']) ? $input['partitionNumber'] : $input['numPartition']; + + if (!$diskNumber || !$partitionNumber) { + throw new \Exception("Disk number or partition number not found in trace input for deploy image"); + } + $deployInput = new DeployImageInput(); $deployInput->method = $input['method'] ?? 'unicast'; $deployInput->type = $input['type'] ?? 'monolithic'; - $deployInput->diskNumber = $input['diskNumber'] ?? 1; - $deployInput->partitionNumber = $input['partitionNumber'] ?? 1; + $deployInput->diskNumber = (int) $diskNumber; + $deployInput->partitionNumber = (int) $partitionNumber; $deployInput->mcastMode = $input['mcastMode'] ?? null; $deployInput->mcastSpeed = $input['mcastSpeed'] ?? null; $deployInput->mcastPort = $input['mcastPort'] ?? null;