feat(webhook): procesar cfg en respuestas de EjecutarScript
ogcore-debian-package/pipeline/head This commit looks good Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details

Permite que la configuración de particiones y caché se actualice automáticamente en la BBDD cuando termina la ejecución de un script en el cliente, evitando tener que encadenar refrescos manuales.
pull/125/head
Juan Manuel Bardallo 2026-07-16 10:48:52 +02:00
parent 22947fd44d
commit 170ff14bd9
1 changed files with 2 additions and 2 deletions

View File

@ -368,7 +368,7 @@ class StatusController extends AbstractController
}
}
if (isset($data['nfn']) && $data['nfn'] === self::REFRESH) {
if (isset($data['nfn']) && ($data['nfn'] === self::REFRESH || $data['nfn'] === self::RUN_SCRIPT)) {
$trace = $this->entityManager->getRepository(Trace::class)->findOneBy(['jobId' => $data['job_id'] ?? '']);
if ($trace) {
$client = $trace->getClient();
@ -386,7 +386,7 @@ class StatusController extends AbstractController
if (isset($data['cfg'])) {
$this->createPartitionService->__invoke($data, $client);
$this->logger->info('Partition configuration updated via RESPUESTA_Actualizar', ['job_id' => $data['job_id'] ?? 'none']);
$this->logger->info('Partition configuration updated via ' . $data['nfn'], ['job_id' => $data['job_id'] ?? 'none']);
}
}
$this->entityManager->flush();