mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
judge: update limit
This commit is contained in:
1 parent
0481876536
commit
7d1ddff47b
10 files changed
+17
-336
No files matched your search
@@ -77,7 +77,7 @@ class JudgeTask {
|
||||
this.tmpdir = path.resolve(TEMP_DIR, 'tmp', this.host, this.rid);
|
||||
this.clean = [];
|
||||
fs.ensureDirSync(this.tmpdir);
|
||||
tmpfs.mount(this.tmpdir, '256m');
|
||||
tmpfs.mount(this.tmpdir, '512m');
|
||||
log.info('Submission: %s/%s/%s pid=%s', this.host, this.domainId, this.rid, this.pid);
|
||||
try {
|
||||
if (this.type === 'judge') await this.doSubmission();
|
||||
@@ -231,7 +231,7 @@ export default class Hydro {
|
||||
fs.ensureDirSync(path.dirname(savePath));
|
||||
const zip = new AdmZip(tmpFilePath);
|
||||
const entries = zip.getEntries();
|
||||
if (entries.length > 256) throw new FormatError('Too many files');
|
||||
if (entries.length > 512) throw new FormatError('Too many files');
|
||||
await new Promise((resolve, reject) => {
|
||||
zip.extractAllToAsync(savePath, true, (e) => {
|
||||
if (e) reject(e);
|
||||
|
||||
@@ -74,7 +74,7 @@ class JudgeTask {
|
||||
this.tmpdir = path.resolve(TEMP_DIR, 'tmp', this.host, this.rid);
|
||||
this.clean = [];
|
||||
fs.ensureDirSync(this.tmpdir);
|
||||
tmpfs.mount(this.tmpdir, '256m');
|
||||
tmpfs.mount(this.tmpdir, '512m');
|
||||
log.info('Submission: %s/%s/%s pid=%s', this.host, this.domain_id, this.rid, this.pid);
|
||||
try {
|
||||
if (this.type === 0) await this.doSubmission();
|
||||
@@ -256,7 +256,7 @@ export default class VJ4 {
|
||||
fs.ensureDirSync(path.dirname(savePath));
|
||||
const zip = new AdmZip(tmpFilePath);
|
||||
const entries = zip.getEntries();
|
||||
if (entries.length > 256) throw new FormatError('Too many files');
|
||||
if (entries.length > 512) throw new FormatError('Too many files');
|
||||
await new Promise((resolve, reject) => {
|
||||
zip.extractAllToAsync(savePath, true, (e) => {
|
||||
if (e) reject(e);
|
||||
@@ -286,7 +286,7 @@ export default class VJ4 {
|
||||
fs.ensureDirSync(path.dirname(savePath));
|
||||
const zip = new AdmZip(tmpFilePath);
|
||||
const entries = zip.getEntries();
|
||||
if (entries.length > 256) throw new FormatError('Too many files');
|
||||
if (entries.length > 512) throw new FormatError('Too many files');
|
||||
await new Promise((resolve, reject) => {
|
||||
zip.extractAllToAsync(savePath, true, (e) => {
|
||||
if (e) reject(e);
|
||||
|
||||
Reference in new issue
Block a user