mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
core: add task.getDelay() method
This commit is contained in:
1 parent
775605f812
commit
5bbce72a68
6 files changed
+17
-4
No files matched your search
@@ -7,6 +7,7 @@ import problem from '../model/problem';
|
||||
import record from '../model/record';
|
||||
import * as contest from '../model/contest';
|
||||
import user from '../model/user';
|
||||
import TaskModel from '../model/task';
|
||||
import paginate from '../lib/paginate';
|
||||
import * as bus from '../service/bus';
|
||||
import {
|
||||
@@ -66,7 +67,10 @@ class RecordListHandler extends RecordHandler {
|
||||
filterUidOrName: uidOrName,
|
||||
};
|
||||
if (this.user.hasPriv(PRIV.PRIV_VIEW_JUDGE_STATISTICS)) {
|
||||
this.response.body.statistics = await record.stat(all ? undefined : domainId);
|
||||
this.response.body.statistics = {
|
||||
...await record.stat(all ? undefined : domainId),
|
||||
delay: await TaskModel.getDelay({ type: 'judge' }),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user