Merge pull request 'nofify_status_to_ping' (#73) from nofify_status_to_ping into main
ogagent/pipeline/head This commit looks good Details

Reviewed-on: #73
fix_log
Nicolas Arenas 2026-05-07 20:45:25 +02:00
commit 4e8e26342f
3 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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:

View File

@ -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)