支持多语言英文

This commit is contained in:
whyour
2023-07-29 18:26:30 +08:00
parent 39bfd39559
commit e7d023a7e0
68 changed files with 2186 additions and 982 deletions
+5 -3
View File
@@ -1,6 +1,6 @@
import pLimit from "p-limit";
import pLimit from 'p-limit';
import os from 'os';
import { AuthDataType, AuthModel } from "../data/auth";
import { AuthDataType, AuthModel } from '../data/auth';
class TaskLimit {
private oneLimit = pLimit(1);
@@ -17,7 +17,9 @@ class TaskLimit {
return;
}
await AuthModel.sync();
const doc = await AuthModel.findOne({ where: { type: AuthDataType.systemConfig } });
const doc = await AuthModel.findOne({
where: { type: AuthDataType.systemConfig },
});
if (doc?.info?.cronConcurrency) {
this.cpuLimit = pLimit(doc?.info?.cronConcurrency);
}