diff --git a/CHANGELOG.md b/CHANGELOG.md index a0fa329..2b68880 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.1.0] - 2025-04-07 + +### Added + +- Oglive: periodically ping ogcore + +## [3.0.0] - 2025-03-31 + +### Changed + +- Ignore module provided in the URLs to the API + ## [2.0.0] - 2025-03-26 ### Changed diff --git a/linux/debian/changelog b/linux/debian/changelog index c5aafb6..df3816c 100644 --- a/linux/debian/changelog +++ b/linux/debian/changelog @@ -1,3 +1,9 @@ +ogagent (3.1.0-1) stable; urgency=medium + + * Oglive: periodically ping ogcore + + -- OpenGnsys developers Mon, 07 Apr 2025 11:50:05 +0200 + ogagent (3.0.0-1) stable; urgency=medium * Ignore module provided in the URLs to the API diff --git a/src/VERSION b/src/VERSION index 4a36342..fd2a018 100644 --- a/src/VERSION +++ b/src/VERSION @@ -1 +1 @@ -3.0.0 +3.1.0 diff --git a/src/opengnsys/workers/oglive_worker.py b/src/opengnsys/workers/oglive_worker.py index 9f53d9f..43b063c 100644 --- a/src/opengnsys/workers/oglive_worker.py +++ b/src/opengnsys/workers/oglive_worker.py @@ -202,7 +202,10 @@ class ogLiveWorker(ServerWorker): progress = float (m.groups()[0]) / 100 return progress + ## monitors child threads, waits for them to finish + ## pings ogcore def mon (self): + n = 0 while True: with self.thread_lock: for k in self.thread_list: @@ -235,6 +238,18 @@ class ogLiveWorker(ServerWorker): self.notifier (k, elem['result']) time.sleep (1) + n += 1 + if not n % 10: + body = { + "iph": self.IPlocal, + "ido": self.idordenador, + "npc": self.nombreordenador, + "idc": self.idcentro, + "ida": self.idaula, + "timestamp": int (time.time()), + } + logger.debug (f'would send ping ({body})') + #self.REST.sendMessage ('clients/status/webhook', body) def interfaceAdmin (self, method, parametros=[]): if method in ['Apagar', 'CambiarAcceso', 'Configurar', 'CrearImagen', 'EjecutarScript', 'getConfiguration', 'getIpAddress', 'IniciarSesion', 'InventarioHardware', 'InventarioSoftware', 'Reiniciar', 'RestaurarImagen']: