mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
judge: add testdata sync lock
This commit is contained in:
1 parent
e9268e120e
commit
d49f134fa3
2 files changed
+3
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.3.18",
|
||||
"version": "2.3.19",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -54,7 +54,7 @@ async function daemon() {
|
||||
const hosts = {};
|
||||
const queue = new Queue<any>();
|
||||
for (const i in _hosts) {
|
||||
_hosts[i].host = i;
|
||||
_hosts[i].host = _hosts[i].host || i;
|
||||
hosts[i] = new Session[_hosts[i].type || 'vj4'](_hosts[i]);
|
||||
await hosts[i].init();
|
||||
}
|
||||
@@ -64,7 +64,7 @@ async function daemon() {
|
||||
for (const i in hosts) await hosts[i].consume(queue);
|
||||
while ('Orz iceb0y') {
|
||||
const [task] = await queue.get();
|
||||
task.handle();
|
||||
await task.handle();
|
||||
}
|
||||
} catch (e) {
|
||||
log.error(e, e.stack);
|
||||
|
||||
Reference in new issue
Block a user