perf: 增加等待插件

pull/199/head
xiaojunnuo 2024-10-02 01:54:27 +08:00
parent 93fc8dc665
commit 3ef0541cc8
1 changed files with 3 additions and 1 deletions

View File

@ -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();