mirror of
https://github.com/certd/certd.git
synced 2026-04-28 07:57:25 +08:00
perf: 增加等待插件
This commit is contained in:
@@ -17,7 +17,7 @@ export class WaitPlugin extends AbstractTaskPlugin {
|
|||||||
title: '等待时长',
|
title: '等待时长',
|
||||||
value: 30,
|
value: 30,
|
||||||
component: {
|
component: {
|
||||||
name: 'a-number',
|
name: 'a-input-number',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
},
|
},
|
||||||
helper: '单位:秒',
|
helper: '单位:秒',
|
||||||
@@ -27,7 +27,9 @@ export class WaitPlugin extends AbstractTaskPlugin {
|
|||||||
|
|
||||||
async onInstance() {}
|
async onInstance() {}
|
||||||
async execute(): Promise<void> {
|
async execute(): Promise<void> {
|
||||||
|
this.logger.info(`等待${this.waitTime}s`);
|
||||||
await this.ctx.utils.sleep(this.waitTime * 1000);
|
await this.ctx.utils.sleep(this.waitTime * 1000);
|
||||||
|
this.logger.info('等待结束');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
new WaitPlugin();
|
new WaitPlugin();
|
||||||
|
|||||||
Reference in New Issue
Block a user