core: fix remote domain langs config

pull/429/head
undefined 2 years ago
parent 2960549553
commit f1b1c89bf1

@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.17.3",
"version": "3.17.4",
"bin": "bin/hydrooj.js",
"main": "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 (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 (t.length) this.pdoc.config.langs = intersection(baseLangs, ...t);
this.pdoc.config.langs = intersection(baseLangs, ...t);
}
await bus.serial('problem/get', this.pdoc, this);
[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.script.rp?.run({}, new Logger('task/rp').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 bus.serial('task/daily');

Loading…
Cancel
Save