为model.file添加错误处理

This commit is contained in:
undefined committed 2020-07-15 22:10:31 +08:00
1 parent 8f6968bbbd
commit 9428efb156
2 files changed
+16 -6

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@ import { STATUS } from '../model/builtin';
export const description = 'Calculate rating of a domain, or all domains';
export async function run({ domainId, isSub = false }, report) {
export async function run({ domainId, isSub = false }, report: Function) {
if (!domainId) {
const domains = await domain.getMulti().toArray();
await report({ message: `Found ${domains.length} domains` });
@@ -16,7 +16,7 @@ export async function run({ domainId, isSub = false }, report) {
await report({
case: {
status: STATUS.STATUS_ACCEPTED,
judgeText: `Domain ${i} finished`,
judgeText: `Domain ${domains[i]._id} finished`,
time_ms: new Date().getTime() - start,
memory_kb: 0,
score: 0,