feat: add support for R stored programs

This commit is contained in:
2022-09-06 21:52:21 +05:00
parent b9d032f148
commit d6651bbdbe
13 changed files with 277 additions and 88 deletions
+8 -2
View File
@@ -34,7 +34,8 @@ export enum LOG_FORMAT_MORGANType {
export enum RunTimeType {
SAS = 'sas',
JS = 'js',
PY = 'py'
PY = 'py',
R = 'r'
}
export enum ReturnCode {
@@ -253,7 +254,8 @@ const verifyRUN_TIMES = (): string[] => {
const verifyExecutablePaths = () => {
const errors: string[] = []
const { RUN_TIMES, SAS_PATH, NODE_PATH, PYTHON_PATH, MODE } = process.env
const { RUN_TIMES, SAS_PATH, NODE_PATH, PYTHON_PATH, RSCRIPT_PATH, MODE } =
process.env
if (MODE === ModeType.Server) {
const runTimes = RUN_TIMES?.split(',')
@@ -269,6 +271,10 @@ const verifyExecutablePaths = () => {
if (runTimes?.includes(RunTimeType.PY) && !PYTHON_PATH) {
errors.push(`- PYTHON_PATH is required for ${RunTimeType.PY} run time`)
}
if (runTimes?.includes(RunTimeType.R) && !RSCRIPT_PATH) {
errors.push(`- RSCRIPT_PATH is required for ${RunTimeType.R} run time`)
}
}
return errors