定时任务默认倒序

This commit is contained in:
whyour
2022-01-18 23:50:18 +08:00
parent 83f6d9926a
commit 0eb9a1fdb0
2 changed files with 17 additions and 10 deletions
+4 -1
View File
@@ -163,7 +163,10 @@ export default class CronService {
}
}
try {
const result = await CrontabModel.findAll({ where: query });
const result = await CrontabModel.findAll({
where: query,
order: [['updatedAt', 'DESC']],
});
return result as any;
} catch (error) {
throw error;