mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: mark model as plugin
This commit is contained in:
1 parent
7f96f602ce
commit
90a9fa95f4
21 files changed
+117
-89
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user