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)