diff --git a/back/loaders/initData.ts b/back/loaders/initData.ts index b3407eb6..9e90daf0 100644 --- a/back/loaders/initData.ts +++ b/back/loaders/initData.ts @@ -133,7 +133,10 @@ export default async () => { // 初始化更新所有任务状态为空闲 // 但保留仍在运行的任务的状态 - const allCrons = await CrontabModel.findAll({ raw: true }); + const allCrons = await CrontabModel.findAll({ + attributes: ['id', 'pid'], + raw: true, + }); const idsToReset: number[] = []; for (const cron of allCrons) {