You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_data/help.yaml
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -240,6 +240,14 @@
240
240
description: |
241
241
This is not a single variable but rather an infinite amount of variables. You can set as many as you want. The dynamic part is the name of the lib data. For example `YTT_LIB_DATA_MYLIB=values.yml` results in the contents of `values.yml` to be used by ytt in the `mylib` library.
242
242
version: 5.0.8
243
+
- name: PROCESS_MAX_BUFFER
244
+
type: number
245
+
allowed: a valid number
246
+
short: Maximum buffer size
247
+
default: 1024 * 1024
248
+
description: |
249
+
The maximum buffer size for the process execution. If you have large output, you might want to increase this value.
logger.warning("Abort is requested, killing child")
95
-
process.kill(child.pid,"SIGTERM");
101
+
logger.warning("Abort is requested, aborting child")
102
+
ac.abort("Aborted by operator")
96
103
}
97
104
})
98
105
.catch((error)=>{logger.error("Failed to create output: ",error)})
99
106
})
107
+
108
+
109
+
100
110
// add exit eventlistener to the process to handle status update
101
-
child.on('exit',function(data){
111
+
child.on('exit',asyncfunction(data){
102
112
// if the exit was an actual request ; set aborted
103
113
if(child.signalCode=='SIGTERM'){
104
-
Job.endJobStatus(jobid,++counter,"stderr","aborted",`${task} was aborted by operator`)
105
-
reject(`${task} was aborted by operator`)
114
+
conststatusResult=awaitmysql.do("SELECT status FROM AnsibleForms.`jobs` WHERE id=?;",[jobid])
115
+
if(statusResult[0].status=="abort"){
116
+
Job.endJobStatus(jobid,++counter,"stderr","aborted",`${task} was aborted by the operator`)
117
+
reject(`${task} was aborted by the operator`)
118
+
}else{
119
+
Job.endJobStatus(jobid,++counter,"stderr","failed",`${task} was aborted by the main process. Likely some buffer or memory error occured. Also check the maxBuffer option.`)
120
+
reject(`${task} was aborted by the main process`)
121
+
}
106
122
}else{// if the exit was natural; set the jobstatus (either success or failed)
0 commit comments