mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
初始化更新任务为空闲状态
This commit is contained in:
parent
f554a5b1a0
commit
7b7d62760e
|
@ -45,16 +45,11 @@ export default async () => {
|
|||
}
|
||||
});
|
||||
|
||||
// patch更新面板任务状态
|
||||
cronDb.find({ name: '更新面板' }).exec((err, docs) => {
|
||||
const doc = docs[0];
|
||||
if (doc && doc.status === CrontabStatus.running) {
|
||||
cronDb.update(
|
||||
{ name: '更新面板' },
|
||||
{ $set: { status: CrontabStatus.idle } },
|
||||
);
|
||||
}
|
||||
});
|
||||
// 初始化更新所有任务状态为空闲
|
||||
cronDb.update(
|
||||
{ status: CrontabStatus.running },
|
||||
{ $set: { status: CrontabStatus.idle } },
|
||||
);
|
||||
|
||||
// 初始化时执行一次所有的ql repo 任务
|
||||
cronDb
|
||||
|
|
Loading…
Reference in New Issue
Block a user