Fix(jobmgr): send START_SCRIPT webhook when script is run under user session (client=true)
ogagent/pipeline/head This commit looks good
Details
ogagent/pipeline/head This commit looks good
Details
parent
70f85b1fc7
commit
43c57ea320
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue