perf: 执行队列数量支持设置

This commit is contained in:
xiaojunnuo
2025-12-26 18:17:05 +08:00
parent 888d9591fe
commit cd944882c3
9 changed files with 125 additions and 60 deletions
@@ -43,12 +43,16 @@ export class SysPublicSettings extends BaseSettings {
//流水线是否启用有效期
pipelineValidTimeEnabled?: boolean = false;
//证书域名添加到监控
certDomainAddToMonitorEnabled?: boolean = false;
// 固定证书有效期天数,0表示不固定
fixedCertExpireDays?: number;
//默认到期前更新天数
defaultCertRenewDays?: number;
// 第三方OAuth配置
oauthEnabled?: boolean = false;
oauthProviders: Record<string, {
@@ -73,6 +77,8 @@ export class SysPrivateSettings extends BaseSettings {
httpRequestTimeout?: number = 30;
pipelineMaxRunningCount?: number;
sms?: {
type?: string;
config?: any;
@@ -8,6 +8,7 @@ import { BaseService } from '../../../basic/index.js';
import { cache, logger, setGlobalProxy } from '@certd/basic';
import * as dns from 'node:dns';
import {mergeUtils} from "@certd/basic";
import { executorQueue } from '../../basic/service/executor-queue.js';
const {merge} = mergeUtils;
/**
* 设置
@@ -140,6 +141,10 @@ export class SysSettingsService extends BaseService<SysSettingsEntity> {
if (bean.dnsResultOrder) {
dns.setDefaultResultOrder(bean.dnsResultOrder as any);
}
if (bean.pipelineMaxRunningCount){
executorQueue.setMaxRunningCount(bean.pipelineMaxRunningCount);
}
}
async updateByKey(key: string, setting: any) {