mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: 修改tmpfs大小为256MB
This commit is contained in:
1 parent
8c65f89e55
commit
1f4420fbaa
4 files changed
+4
-4
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.1.21",
|
"version": "2.1.22",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "masnn",
|
"author": "masnn",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class JudgeTask {
|
|||||||
this.tmpdir = path.resolve(TEMP_DIR, 'tmp', this.host, this.rid);
|
this.tmpdir = path.resolve(TEMP_DIR, 'tmp', this.host, this.rid);
|
||||||
this.clean = [];
|
this.clean = [];
|
||||||
fs.ensureDirSync(this.tmpdir);
|
fs.ensureDirSync(this.tmpdir);
|
||||||
tmpfs.mount(this.tmpdir, '64m');
|
tmpfs.mount(this.tmpdir, '256m');
|
||||||
log.info('Submission: %s/%s/%s pid=%s', this.host, this.domain_id, this.rid, this.pid);
|
log.info('Submission: %s/%s/%s pid=%s', this.host, this.domain_id, this.rid, this.pid);
|
||||||
try {
|
try {
|
||||||
if (this.type === 0) await this.doSubmission();
|
if (this.type === 0) await this.doSubmission();
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ async function postInit() {
|
|||||||
this.tmpdir = path.resolve(tmpdir(), 'tmp', this.rid);
|
this.tmpdir = path.resolve(tmpdir(), 'tmp', this.rid);
|
||||||
this.clean = [];
|
this.clean = [];
|
||||||
fs.ensureDirSync(this.tmpdir);
|
fs.ensureDirSync(this.tmpdir);
|
||||||
tmpfs.mount(this.tmpdir, '64m');
|
tmpfs.mount(this.tmpdir, '256m');
|
||||||
logger.info(`Submission: ${this.rid}`, { pid: this.pid });
|
logger.info(`Submission: ${this.rid}`, { pid: this.pid });
|
||||||
if (this.config.input) await this.run();
|
if (this.config.input) await this.run();
|
||||||
else if (this.config.hack) await this.hack();
|
else if (this.config.hack) await this.hack();
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ int main(){
|
|||||||
};
|
};
|
||||||
context.tmpdir = path.resolve(tmpdir(), 'hydro', 'tmp', 'sysinfo');
|
context.tmpdir = path.resolve(tmpdir(), 'hydro', 'tmp', 'sysinfo');
|
||||||
fs.ensureDirSync(context.tmpdir);
|
fs.ensureDirSync(context.tmpdir);
|
||||||
tmpfs.mount(context.tmpdir, '64m');
|
tmpfs.mount(context.tmpdir, '32m');
|
||||||
await judge(context).catch((e) => console.error(e));
|
await judge(context).catch((e) => console.error(e));
|
||||||
// eslint-disable-next-line no-await-in-loop
|
// eslint-disable-next-line no-await-in-loop
|
||||||
for (const clean of context.clean) await clean().catch(noop);
|
for (const clean of context.clean) await clean().catch(noop);
|
||||||
|
|||||||
Reference in new issue
Block a user