-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
87 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,6 @@ import { | |
DataResource, | ||
DataDepartment, | ||
UserTimesheet, | ||
Language, | ||
QuestionBank, | ||
]), | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export class LanguageModel { | ||
id: number; | ||
name: string; // 语言名称 node | ||
version: string; // 语言版本 v16.13.1 | ||
image: string; // 镜像名 node | ||
fileName: string; // 保存文件名 index.js | ||
beforInjectionCodeCmd: string; // 注入代码前cmd命令 创建项目/文件夹等 | ||
afterInjectionCodeCmd: string; // 注入代码后cmd命令 编译/有运行等 | ||
timeout: number; // 运行超时时间 秒 60 | ||
memory: number; // 分配容器内存大小 MB 100 | ||
cpuset: string; // 允许容器使用CPU核心 0-4 或者 1,2,4 | ||
captureCode: string; // 数据收集代码 运行时长,占用内存等 | ||
initialCode: string; // 初始代码 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import fetch from 'node-fetch'; | ||
export async function httpRequest<T>( | ||
input: RequestInfo | URL, | ||
init?: RequestInit, | ||
): Promise<T> { | ||
const res = await fetch(input, { | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
...init, | ||
}).then((res): Promise<T> => res.json()); | ||
return res; | ||
} | ||
|
||
export async function httpPost<T>( | ||
input: RequestInfo | URL, | ||
init?: RequestInit, | ||
): Promise<T> { | ||
init.method = 'POST'; | ||
return httpRequest<T>(input, init); | ||
} | ||
|
||
export async function httpGet<T>( | ||
input: RequestInfo | URL, | ||
init?: RequestInit, | ||
): Promise<T> { | ||
return httpRequest<T>(input, { method: 'GET', ...init }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,9 @@ | |
], | ||
"@entities/*": [ | ||
"./src/entities/*" | ||
], | ||
"@models/*": [ | ||
"./src/models/*" | ||
] | ||
} | ||
} | ||
|