mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: 测试点中不传入STATUS_JUDGING
This commit is contained in:
1 parent
36fef2cd20
commit
10a57f88da
3 files changed
+1
-6
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.1.33",
|
"version": "2.1.34",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "masnn",
|
"author": "masnn",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ function judgeCase(c, sid) {
|
|||||||
|| (ctxSubtask.subtask.type === 'max' && ctxSubtask.score === ctxSubtask.subtask.score)
|
|| (ctxSubtask.subtask.type === 'max' && ctxSubtask.score === ctxSubtask.subtask.score)
|
||||||
|| (ctxSubtask.subtask.if && ctx.failed[sid])) {
|
|| (ctxSubtask.subtask.if && ctx.failed[sid])) {
|
||||||
ctx.next({
|
ctx.next({
|
||||||
status: STATUS.STATUS_JUDGING,
|
|
||||||
case: {
|
case: {
|
||||||
status: STATUS.STATUS_CANCELED,
|
status: STATUS.STATUS_CANCELED,
|
||||||
score: 0,
|
score: 0,
|
||||||
@@ -87,7 +86,6 @@ function judgeCase(c, sid) {
|
|||||||
ctx.total_time_usage_ms += time_usage_ms;
|
ctx.total_time_usage_ms += time_usage_ms;
|
||||||
ctx.total_memory_usage_kb = Math.max(ctx.total_memory_usage_kb, memory_usage_kb);
|
ctx.total_memory_usage_kb = Math.max(ctx.total_memory_usage_kb, memory_usage_kb);
|
||||||
ctx.next({
|
ctx.next({
|
||||||
status: STATUS.STATUS_JUDGING,
|
|
||||||
case: {
|
case: {
|
||||||
status,
|
status,
|
||||||
score: 0,
|
score: 0,
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { streamToBuffer } from '../utils';
|
|||||||
import {
|
import {
|
||||||
Pdoc, User, Rdoc, PathComponent,
|
Pdoc, User, Rdoc, PathComponent,
|
||||||
} from '../interface';
|
} from '../interface';
|
||||||
import { Logger } from '../logger';
|
|
||||||
import paginate from '../lib/paginate';
|
import paginate from '../lib/paginate';
|
||||||
import { isTitle, isContent, isPid } from '../lib/validator';
|
import { isTitle, isContent, isPid } from '../lib/validator';
|
||||||
import { ProblemAdd } from '../lib/ui';
|
import { ProblemAdd } from '../lib/ui';
|
||||||
@@ -29,7 +28,6 @@ import {
|
|||||||
|
|
||||||
export const parseCategory = (value: string) => flatten(value.split('+').map((e) => e.split(','))).map((e) => e.trim());
|
export const parseCategory = (value: string) => flatten(value.split('+').map((e) => e.split(','))).map((e) => e.trim());
|
||||||
export const parsePid = (value: string) => (isSafeInteger(value) ? parseInt(value, 10) : value);
|
export const parsePid = (value: string) => (isSafeInteger(value) ? parseInt(value, 10) : value);
|
||||||
const logger = new Logger('problem');
|
|
||||||
|
|
||||||
export class ProblemHandler extends Handler {
|
export class ProblemHandler extends Handler {
|
||||||
async __prepare() {
|
async __prepare() {
|
||||||
@@ -228,7 +226,6 @@ export class ProblemDetailHandler extends ProblemHandler {
|
|||||||
async postRejudge(domainId: string, pid: number) {
|
async postRejudge(domainId: string, pid: number) {
|
||||||
this.checkPerm(PERM.PERM_REJUDGE_PROBLEM);
|
this.checkPerm(PERM.PERM_REJUDGE_PROBLEM);
|
||||||
// TODO maybe async?
|
// TODO maybe async?
|
||||||
console.log(await record.getMulti(domainId, { pid }).count());
|
|
||||||
await record.getMulti(domainId, { pid }).forEach(async (doc) => {
|
await record.getMulti(domainId, { pid }).forEach(async (doc) => {
|
||||||
await record.reset(domainId, doc._id, true);
|
await record.reset(domainId, doc._id, true);
|
||||||
await record.judge(domainId, doc._id, -1);
|
await record.judge(domainId, doc._id, -1);
|
||||||
|
|||||||
Reference in new issue
Block a user