mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: seperate task and schedule to enhance performance (#440)
This commit is contained in:
1 parent
101fcaa1b5
commit
175609259a
19 files changed
+250
-144
No files matched your search
@@ -16,9 +16,9 @@ import domain from '../model/domain';
|
||||
import oauth from '../model/oauth';
|
||||
import * as oplog from '../model/oplog';
|
||||
import problem, { ProblemDoc } from '../model/problem';
|
||||
import ScheduleModel from '../model/schedule';
|
||||
import SolutionModel from '../model/solution';
|
||||
import * as system from '../model/system';
|
||||
import task from '../model/task';
|
||||
import token from '../model/token';
|
||||
import user from '../model/user';
|
||||
import {
|
||||
@@ -376,7 +376,7 @@ class UserDetailHandler extends Handler {
|
||||
class UserDeleteHandler extends Handler {
|
||||
async post({ password }) {
|
||||
this.user.checkPassword(password);
|
||||
const tid = await task.add({
|
||||
const tid = await ScheduleModel.add({
|
||||
executeAfter: moment().add(7, 'days').toDate(),
|
||||
type: 'script',
|
||||
id: 'deleteUser',
|
||||
|
||||
Reference in new issue
Block a user