core: domain_join: add msg (fix #87)

This commit is contained in:
undefined committed 2021-07-20 23:04:59 +08:00
1 parent 42d48cc3d6
commit f38c749479
3 files changed
+5 -4

No files matched your search

+3 -2
View File
@@ -16,7 +16,7 @@ const Score = {
min: Math.min,
};
function judgeCase(c, sid) {
function judgeCase(c, sid: string) {
return async (ctx, ctxSubtask) => {
if (ctx.config.template) {
if (ctx.config.template[ctx.lang]) {
@@ -105,7 +105,7 @@ function judgeCase(c, sid) {
};
}
function judgeSubtask(subtask, sid) {
function judgeSubtask(subtask, sid: string) {
return async (ctx) => {
subtask.type = subtask.type || 'min';
const ctxSubtask = {
@@ -173,6 +173,7 @@ export const judge = async (ctx) => {
if (ctx.failed[required.toString()]) effective = false;
}
if (effective) ctx.total_score += scores[sid];
console.log(effective, ctx.total_score, scores[sid], sid);
}
ctx.stat.done = new Date();
if (process.env.DEV) ctx.next({ message: JSON.stringify(ctx.stat) });