core: mark model as plugin

This commit is contained in:
undefined committed 2022-09-30 23:34:54 +08:00
1 parent 7f96f602ce
commit 90a9fa95f4
21 files changed
+117 -89

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@
import os from 'os';
import {
Context, db, DomainModel, JudgeHandler, Logger,
ProblemModel, sleep, STATUS, TaskModel,
ProblemModel, sleep, STATUS, TaskModel, Time,
} from 'hydrooj';
import { BasicProvider, IBasicProvider, RemoteAccount } from './interface';
import { getDifficulty } from './providers/codeforces';
@@ -99,7 +99,7 @@ class Service {
async main() {
const res = await this.login();
if (!res) return;
setInterval(() => this.login(), 1 * 3600 * 1000);
setInterval(() => this.login(), Time.hour);
TaskModel.consume({ type: 'remotejudge', subType: this.account.type }, this.judge.bind(this), false);
const ddocs = await DomainModel.getMulti({ mount: this.account.type }).toArray();
do {