mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
重测整题功能
This commit is contained in:
1 parent
7a4d5209b8
commit
76b001305d
6 files changed
+30
-3
No files matched your search
@@ -0,0 +1,10 @@
|
|||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
@@ -6,3 +6,6 @@ pdoc.secretConfig?
|
|||||||
message.markAsRead
|
message.markAsRead
|
||||||
基于document的model难以lint,建议拆分
|
基于document的model难以lint,建议拆分
|
||||||
检查多余的索引
|
检查多余的索引
|
||||||
|
+hack
|
||||||
|
评测队列优先级系统
|
||||||
|
讨论浏览数量显示
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.13.6",
|
"version": "2.13.7",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
|
|||||||
@@ -217,6 +217,17 @@ class ProblemDetailHandler extends ProblemHandler {
|
|||||||
}
|
}
|
||||||
this.response.redirect = this.url('problem_settings', { domainId: destDomainId, pid });
|
this.response.redirect = this.url('problem_settings', { domainId: destDomainId, pid });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@param('pid', Types.UnsignedInt)
|
||||||
|
async postRejudge(domainId: string, pid: number) {
|
||||||
|
this.checkPerm(PERM.PERM_REJUDGE_PROBLEM);
|
||||||
|
// TODO maybe async?
|
||||||
|
await record.getMulti(domainId, { pid }).forEach(async (doc) => {
|
||||||
|
await record.reset(domainId, doc._id, true);
|
||||||
|
await record.judge(domainId, doc._id);
|
||||||
|
});
|
||||||
|
this.back();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ProblemSubmitHandler extends ProblemDetailHandler {
|
class ProblemSubmitHandler extends ProblemDetailHandler {
|
||||||
|
|||||||
@@ -207,13 +207,13 @@ export async function load() {
|
|||||||
const cnt = await entry({ entry: 'master' });
|
const cnt = await entry({ entry: 'master' });
|
||||||
logger.info('Master started');
|
logger.info('Master started');
|
||||||
cluster.on('exit', (worker, code, signal) => {
|
cluster.on('exit', (worker, code, signal) => {
|
||||||
logger.info(`Worker ${worker.process.pid} ${worker.id} exit: ${code} ${signal}`);
|
logger.warn(`Worker ${worker.process.pid} ${worker.id} exit: ${code} ${signal}`);
|
||||||
});
|
});
|
||||||
cluster.on('disconnect', (worker) => {
|
cluster.on('disconnect', (worker) => {
|
||||||
logger.info(`Worker ${worker.process.pid} ${worker.id} disconnected`);
|
logger.info(`Worker ${worker.process.pid} ${worker.id} disconnected`);
|
||||||
});
|
});
|
||||||
cluster.on('listening', (worker, address) => {
|
cluster.on('listening', (worker, address) => {
|
||||||
logger.info(`Worker ${worker.process.pid} ${worker.id} listening at `, address);
|
logger.success(`Worker ${worker.process.pid} ${worker.id} listening at `, address);
|
||||||
});
|
});
|
||||||
cluster.on('online', (worker) => {
|
cluster.on('online', (worker) => {
|
||||||
logger.success(`Worker ${worker.process.pid} ${worker.id} is online`);
|
logger.success(`Worker ${worker.process.pid} ${worker.id} is online`);
|
||||||
|
|||||||
@@ -3,10 +3,12 @@ import moment from 'moment-timezone';
|
|||||||
import { Dictionary } from 'lodash';
|
import { Dictionary } from 'lodash';
|
||||||
import * as builtin from './builtin';
|
import * as builtin from './builtin';
|
||||||
import { Setting as _Setting } from '../interface';
|
import { Setting as _Setting } from '../interface';
|
||||||
|
import { Logger } from '../logger';
|
||||||
import * as bus from '../service/bus';
|
import * as bus from '../service/bus';
|
||||||
|
|
||||||
type SettingDict = Dictionary<_Setting>;
|
type SettingDict = Dictionary<_Setting>;
|
||||||
|
|
||||||
|
const logger = new Logger('model/setting');
|
||||||
const countries = moment.tz.countries();
|
const countries = moment.tz.countries();
|
||||||
const tzs = new Set();
|
const tzs = new Set();
|
||||||
for (const country of countries) {
|
for (const country of countries) {
|
||||||
@@ -141,6 +143,7 @@ SystemSetting(
|
|||||||
);
|
);
|
||||||
|
|
||||||
bus.once('app/started', async () => {
|
bus.once('app/started', async () => {
|
||||||
|
logger.debug('Ensuring settings');
|
||||||
for (const setting of SYSTEM_SETTINGS) {
|
for (const setting of SYSTEM_SETTINGS) {
|
||||||
if (setting.value) {
|
if (setting.value) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|||||||
Reference in new issue
Block a user