mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
Merge branch 'v2' into v2-dev
# Conflicts: # packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/notification-form/index.vue # packages/ui/certd-server/src/plugins/plugin-other/plugins/plugin-restart.ts
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Autoload, Config, Init, Inject, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
import { PipelineService } from '../pipeline/service/pipeline-service.js';
|
||||
import { logger } from '../../utils/logger.js';
|
||||
import { SysSettingsService } from '../system/service/sys-settings-service.js';
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Singleton)
|
||||
@@ -16,9 +17,13 @@ export class AutoRegisterCron {
|
||||
@Config('cron.immediateTriggerOnce')
|
||||
private immediateTriggerOnce = false;
|
||||
|
||||
@Inject()
|
||||
sysSettingsService: SysSettingsService;
|
||||
|
||||
@Init()
|
||||
async init() {
|
||||
logger.info('加载定时trigger开始');
|
||||
|
||||
await this.pipelineService.onStartup(this.immediateTriggerOnce, this.onlyAdminUser);
|
||||
logger.info('加载定时trigger完成');
|
||||
//
|
||||
|
||||
@@ -13,6 +13,7 @@ export class SysPublicSettings extends BaseSettings {
|
||||
static __access__ = 'public';
|
||||
registerEnabled = false;
|
||||
managerOtherUserPipeline = false;
|
||||
// triggerOnStartup = false;
|
||||
}
|
||||
|
||||
export class SysPrivateSettings extends BaseSettings {
|
||||
|
||||
@@ -27,6 +27,7 @@ export class RestartCertdPlugin extends AbstractTaskPlugin {
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info(`Certd 将在 ${this.delay} 秒后关闭`);
|
||||
setTimeout(() => {
|
||||
this.logger.info('重启 Certd');
|
||||
process.exit(1);
|
||||
}, this.delay * 1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user