mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core: fix remote domain langs config
This commit is contained in:
1 parent
2960549553
commit
f1b1c89bf1
3 files changed
+3
-3
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "3.17.3",
|
"version": "3.17.4",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
|
|||||||
if (this.pdoc.config.langs) t.push(this.pdoc.config.langs);
|
if (this.pdoc.config.langs) t.push(this.pdoc.config.langs);
|
||||||
if (ddoc.langs) t.push(ddoc.langs.split(',').map((i) => i.trim()).filter((i) => i));
|
if (ddoc.langs) t.push(ddoc.langs.split(',').map((i) => i.trim()).filter((i) => i));
|
||||||
if (this.domain.langs) t.push(this.domain.langs.split(',').map((i) => i.trim()).filter((i) => i));
|
if (this.domain.langs) t.push(this.domain.langs.split(',').map((i) => i.trim()).filter((i) => i));
|
||||||
if (t.length) this.pdoc.config.langs = intersection(baseLangs, ...t);
|
this.pdoc.config.langs = intersection(baseLangs, ...t);
|
||||||
}
|
}
|
||||||
await bus.serial('problem/get', this.pdoc, this);
|
await bus.serial('problem/get', this.pdoc, this);
|
||||||
[this.psdoc, this.udoc] = await Promise.all([
|
[this.psdoc, this.udoc] = await Promise.all([
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ Worker.addHandler('task.daily', async () => {
|
|||||||
await global.Hydro.model.record.coll.deleteMany({ contest: new ObjectID('000000000000000000000000') });
|
await global.Hydro.model.record.coll.deleteMany({ contest: new ObjectID('000000000000000000000000') });
|
||||||
await global.Hydro.script.rp?.run({}, new Logger('task/rp').debug);
|
await global.Hydro.script.rp?.run({}, new Logger('task/rp').debug);
|
||||||
await global.Hydro.script.problemStat?.run({}, new Logger('task/problem').debug);
|
await global.Hydro.script.problemStat?.run({}, new Logger('task/problem').debug);
|
||||||
if (global.Hydro.model.system.get('server.checkUpdate')) {
|
if (global.Hydro.model.system.get('server.checkUpdate') && !(new Date().getDay() % 3)) {
|
||||||
await global.Hydro.script.checkUpdate?.run({}, new Logger('task/checkUpdate').debug);
|
await global.Hydro.script.checkUpdate?.run({}, new Logger('task/checkUpdate').debug);
|
||||||
}
|
}
|
||||||
await bus.serial('task/daily');
|
await bus.serial('task/daily');
|
||||||
|
|||||||
Reference in new issue
Block a user