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
In some cases it is required to execute some JS functions to clean used resources by CLI. Add an easy way to specify JS files which should be executed by the cleanup process.
Each JS action is defined by a JS File, which should be required, data that will be passed to the default exported function in the file and timeout - if the action cannot be executed for specified time (3 seconds is the default), the child process in which the JS action is executed will be killed.
fileLogService.logData({message: `Finished xecuting action for file: ${jsCommand.filePath} and data ${JSON.stringify(jsCommand.data)}`});
32
+
33
+
}catch(err){
34
+
fileLogService.logData({message: `Unable to execute action for file ${jsCommand.filePath} with data ${JSON.stringify(jsCommand.data)}. Error is: ${err}.`,type: FileLogMessageType.Error});
fileLogService.logData({message: `cleanup-process removed command for execution: ${JSON.stringify(commandInfo)}`});
58
82
}else{
59
-
fileLogService.logData({message: `cleanup-process cannot remove command for execution as it has note been added before: ${JSON.stringify(commandInfo)}`});
83
+
fileLogService.logData({message: `cleanup-process cannot remove command for execution as it has not been added before: ${JSON.stringify(commandInfo)}`});
fileLogService.logData({message: `cleanup-process removed JS action for execution: ${JSON.stringify(jsCommand)}`});
130
+
}else{
131
+
fileLogService.logData({message: `cleanup-process cannot remove JS action for execution as it has not been added before: ${JSON.stringify(jsCommand)}`});
fileLogService.logData({message: `Unable to handle message of type ${cleanupProcessMessage.messageType}. Full message is ${JSON.stringify(cleanupProcessMessage)}`,type: FileLogMessageType.Error});
0 commit comments