diff --git a/src/opengnsys/modules/server/OpenGnSys/__init__.py b/src/opengnsys/modules/server/OpenGnSys/__init__.py index abaec46..ac3baaa 100644 --- a/src/opengnsys/modules/server/OpenGnSys/__init__.py +++ b/src/opengnsys/modules/server/OpenGnSys/__init__.py @@ -507,10 +507,20 @@ class OpenGnSysWorker(ServerWorker): def process_client_script_launched(self, data): import tempfile + job_id = data['job_id'] job_id_path = os.path.join(tempfile.gettempdir(), 'EjecutarScript-jobid') with open (job_id_path, 'w') as fd: - fd.write (data['job_id']) - self.client_jobs.add(data['job_id']) + fd.write (job_id) + self.client_jobs.add(job_id) + + try: + self.REST.sendMessage('clients/status/webhook', { + "nfn": "START_SCRIPT", + "job_id": job_id + }) + except Exception as e: + logger.error(f"Failed to send START_SCRIPT webhook for client job {job_id}: {e}") + return True def process_client_script_finished(self, data):