修改任务状态值

This commit is contained in:
whyour 2023-07-02 16:09:01 +08:00
parent f970322f0a
commit ee6e5bd8b4
3 changed files with 7 additions and 7 deletions

View File

@ -43,9 +43,9 @@ export class Crontab {
}
export enum CrontabStatus {
'running',
'queued',
'idle',
'running' = 0,
'queued' = 0.5,
'idle' = 1,
'disabled',
}

View File

@ -32,7 +32,7 @@ export default async () => {
// 初始化更新所有任务状态为空闲
await CrontabModel.update(
{ status: CrontabStatus.idle },
{ where: { status: { [Op.ne]: CrontabStatus.disabled } } },
{ where: {} },
);
// 初始化时安装所有处于安装中,安装成功,安装失败的依赖

View File

@ -1,7 +1,7 @@
export enum CrontabStatus {
'running',
'queued',
'idle',
'running' = 0,
'queued' = 0.5,
'idle' = 1,
'disabled',
}