From da50ab5e7fd5e31d04ac239685421d9d9225c6f6 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Thu, 7 May 2026 20:36:45 +0200 Subject: [PATCH 1/2] feat(ogagent): report busy state and os type in heartbeat ping Add 'busy' and 'st' fields to the periodic webhook ping so ogCore can track whether a client is executing a job without waiting for a command response. - oglive_worker: busy derived from thread_list running state, st='OGL' - OpenGnSys module: busy derived from jobmgr active processes, st mapped from operations.os_type (LNX/WIN/OSX) Co-Authored-By: Claude Sonnet 4.6 --- src/opengnsys/modules/server/OpenGnSys/__init__.py | 3 +++ src/opengnsys/workers/oglive_worker.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/opengnsys/modules/server/OpenGnSys/__init__.py b/src/opengnsys/modules/server/OpenGnSys/__init__.py index c1ae66b..467c773 100644 --- a/src/opengnsys/modules/server/OpenGnSys/__init__.py +++ b/src/opengnsys/modules/server/OpenGnSys/__init__.py @@ -125,9 +125,12 @@ class OpenGnSysWorker(ServerWorker): time.sleep(1) n += 1 if not n % 10: + _st_map = {'linux': 'LNX', 'macos': 'OSX', 'windows': 'WIN'} body = { "iph": self.interface.ip, "timestamp": int(time.time()), + "busy": any(j['p'].poll() is None for j in self.jobmgr.jobs.values()), + "st": _st_map.get(operations.os_type.lower(), 'UNK'), } result = self.REST.sendMessage('clients/status/webhook', body) if result is None: diff --git a/src/opengnsys/workers/oglive_worker.py b/src/opengnsys/workers/oglive_worker.py index bc146c9..2caeade 100644 --- a/src/opengnsys/workers/oglive_worker.py +++ b/src/opengnsys/workers/oglive_worker.py @@ -260,6 +260,8 @@ class ogLiveWorker(ServerWorker): body = { 'iph': self.IPlocal, 'timestamp': int (time.time()), + 'busy': any(elem['running'] for elem in self.thread_list.values()), + 'st': 'OGL', } #logger.debug (f'about to send ping ({body})') self.REST.sendMessage ('clients/status/webhook', body) -- 2.40.1 From 4fdc215b98aab5e60523ea4db7fa7c5d66b63bb5 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Thu, 7 May 2026 20:39:24 +0200 Subject: [PATCH 2/2] docs(ogagent): update CHANGELOG for 8.5.3 Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 664c3c1..4cde982 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ 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). +## [8.5.3] - 2026-05-07 + +### Added + +- Report `busy` and `st` fields in the periodic heartbeat ping to ogCore, so ogCore can update the client status without waiting for a command response. `busy` is `true` while a job is running; `st` indicates the base OS type (`OGL`, `LNX`, `WIN`, `OSX`) + ## [8.5.2] - 2026-04-28 ### Fixed -- 2.40.1