Fix(jobmgr): send START_SCRIPT webhook when script is run under user session (client=true)
ogagent/pipeline/head This commit looks good Details

pull/76/head
Juan Manuel Bardallo 2026-07-22 14:37:17 +02:00
parent 70f85b1fc7
commit 43c57ea320
1 changed files with 12 additions and 2 deletions

View File

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