judge: add testdata sync lock

This commit is contained in:
undefined committed 2021-02-28 18:18:28 +08:00
1 parent e9268e120e
commit d49f134fa3
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -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",
+2 -2
View File
@@ -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);