mirror of
https://github.com/certd/certd.git
synced 2026-05-15 20:47:31 +08:00
feat: 基础版不再限制流水线数量
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ import crypto from 'crypto';
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AutoInitSite {
|
||||
export class AutoAInitSite {
|
||||
@Inject()
|
||||
userService: UserService;
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { Cron } from '../cron/cron.js';
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AutoRegisterCron {
|
||||
export class AutoCRegisterCron {
|
||||
@Inject()
|
||||
pipelineService: PipelineService;
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { logger, utils } from '@certd/basic';
|
||||
import { UserSuiteService } from '@certd/commercial-core';
|
||||
import { Autoload, Init, Inject, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class AutoDMitterRegister {
|
||||
@Inject()
|
||||
userSuiteService: UserSuiteService;
|
||||
|
||||
@Init()
|
||||
async init() {
|
||||
await this.registerOnNewUser();
|
||||
}
|
||||
async registerOnNewUser() {
|
||||
utils.mitter.on('register', async (req: { userId: number }) => {
|
||||
logger.info('register event', req.userId);
|
||||
await this.userSuiteService.presentGiftSuite(req.userId);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,9 @@ export class AutoZPrint {
|
||||
async init() {
|
||||
//监听https
|
||||
this.startHttpsServer();
|
||||
|
||||
if (isDev()) {
|
||||
this.startHeapLog();
|
||||
}
|
||||
const installInfo: SysInstallInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
|
||||
logger.info('=========================================');
|
||||
logger.info('当前站点ID:', installInfo.siteId);
|
||||
@@ -36,9 +38,6 @@ export class AutoZPrint {
|
||||
}
|
||||
logger.info('Certd已启动');
|
||||
logger.info('=========================================');
|
||||
if (isDev()) {
|
||||
this.startHeapLog();
|
||||
}
|
||||
}
|
||||
|
||||
startHeapLog() {
|
||||
@@ -50,7 +49,7 @@ export class AutoZPrint {
|
||||
}, 60000);
|
||||
}
|
||||
|
||||
async startHttpsServer() {
|
||||
startHttpsServer() {
|
||||
if (!this.httpsConfig.enabled) {
|
||||
logger.info('Https server is not enabled');
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user