系统设置增加依赖代理和镜像源设置

This commit is contained in:
whyour
2023-11-06 23:55:16 +08:00
parent 4a3ac7dc4b
commit 9ed107980c
10 changed files with 213 additions and 38 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import PQueue, { QueueAddOptions } from 'p-queue-cjs';
import os from 'os';
import { AuthDataType, AuthModel } from '../data/auth';
import { AuthDataType, SystemModel } from '../data/system';
import Logger from '../loaders/logger';
class TaskLimit {
@@ -59,8 +59,8 @@ class TaskLimit {
this.cronLimit.concurrency = limit;
return;
}
await AuthModel.sync();
const doc = await AuthModel.findOne({
await SystemModel.sync();
const doc = await SystemModel.findOne({
where: { type: AuthDataType.systemConfig },
});
if (doc?.info?.cronConcurrency) {