mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
update deps
This commit is contained in:
1 parent
722d964c5e
commit
5589b7dabe
13 files changed
+21
-17
No files matched your search
@@ -33,7 +33,7 @@ export = async function compile(
|
||||
} if (info.type === 'interpreter') {
|
||||
f[target] = { content: code };
|
||||
return {
|
||||
execute: info.execute, copyIn: f, clean: () => Promise.resolve(), time: info.time || 1,
|
||||
execute: info.execute, copyIn: f, clean: () => Promise.resolve(null), time: info.time || 1,
|
||||
};
|
||||
}
|
||||
throw new SystemError('Unknown language type.');
|
||||
|
||||
@@ -271,7 +271,7 @@ export default class Hydro {
|
||||
}, 30000);
|
||||
});
|
||||
await new Promise((resolve) => {
|
||||
this.ws.once('open', () => { resolve(); });
|
||||
this.ws.once('open', () => { resolve(null); });
|
||||
});
|
||||
log.info(`[${this.config.host}] 已连接`);
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ export default class VJ4 {
|
||||
await new Promise((resolve, reject) => {
|
||||
zip.extractAllToAsync(savePath, true, (e) => {
|
||||
if (e) reject(e);
|
||||
else resolve();
|
||||
else resolve(null);
|
||||
});
|
||||
});
|
||||
await fs.unlink(tmpFilePath);
|
||||
@@ -290,7 +290,7 @@ export default class VJ4 {
|
||||
await new Promise((resolve, reject) => {
|
||||
zip.extractAllToAsync(savePath, true, (e) => {
|
||||
if (e) reject(e);
|
||||
else resolve();
|
||||
else resolve(null);
|
||||
});
|
||||
});
|
||||
await fs.unlink(tmpFilePath);
|
||||
@@ -321,7 +321,7 @@ export default class VJ4 {
|
||||
}, 30000);
|
||||
});
|
||||
await new Promise((resolve) => {
|
||||
this.ws.once('open', () => { resolve(); });
|
||||
this.ws.once('open', () => { resolve(null); });
|
||||
});
|
||||
log.info(`[${this.config.host}] 已连接`);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ export const judge = async (ctx) => {
|
||||
})(),
|
||||
(async () => {
|
||||
if (!ctx.config.checker_type || ctx.config.checker_type === 'default') {
|
||||
return { execute: '', copyIn: {}, clean: () => Promise.resolve() };
|
||||
return { execute: '', copyIn: {}, clean: () => Promise.resolve(null) };
|
||||
}
|
||||
const copyIn = {};
|
||||
for (const file of ctx.config.judge_extra_files) {
|
||||
|
||||
@@ -30,7 +30,7 @@ export function parseMemoryMB(str: string) {
|
||||
export function sleep(timeout: number) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve();
|
||||
resolve(null);
|
||||
}, timeout);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user