mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
fix problems found by deepscan.io
This commit is contained in:
1 parent
e8dcd97561
commit
dd4ecdb029
13 files changed
+33
-29
No files matched your search
@@ -4,6 +4,7 @@ import axios from 'axios';
|
||||
import AdmZip from 'adm-zip';
|
||||
import fs from 'fs-extra';
|
||||
import WebSocket from 'ws';
|
||||
import { noop } from 'lodash';
|
||||
import * as tmpfs from '../tmpfs';
|
||||
import log from '../log';
|
||||
import { compilerText, Queue } from '../utils';
|
||||
@@ -99,7 +100,7 @@ class JudgeTask {
|
||||
});
|
||||
}
|
||||
}
|
||||
for (const clean of this.clean) await clean().catch();
|
||||
for (const clean of this.clean) await clean().catch(noop);
|
||||
tmpfs.umount(this.tmpdir);
|
||||
fs.removeSync(this.tmpdir);
|
||||
}
|
||||
@@ -257,7 +258,7 @@ export default class VJ4 {
|
||||
});
|
||||
});
|
||||
await fs.unlink(tmpFilePath);
|
||||
await this.processData(savePath).catch();
|
||||
await this.processData(savePath).catch(noop);
|
||||
} catch (e) {
|
||||
if (retry) await this.problemData(domainId, pid, savePath, retry - 1);
|
||||
else throw e;
|
||||
|
||||
Reference in new issue
Block a user