mirror of https://github.com/certd/certd
perf: 增加等待插件
parent
93fc8dc665
commit
3ef0541cc8
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue