This commit is contained in:
哆啦好梦
2023-04-07 19:01:23 +08:00
parent 433cbfb0ff
commit 36d164ae52
4 changed files with 59 additions and 52 deletions

View File

@@ -683,27 +683,33 @@ class ExampleController extends Controller {
*/
someJob (args, event) {
let jobId = args.id;
let type = args.type;
let pid = this.service.example.doJob(jobId, type, event);
let action = args.action;
let result;
switch (action) {
case 'create':
result = this.service.example.doJob(jobId, action, event);
break;
case 'pause':
this.service.example.doJob(jobId, action, event);
break;
case 'continue':
this.service.example.doJob(jobId, action, event);
break;
case 'close':
this.service.example.doJob(jobId, action, event);
break;
default:
}
let data = {
jobId,
pid
action,
result
}
return data;
}
/**
* 关闭任务
*/
closeJob (args, event) {
let jobId = args.id;
let type = args.type;
this.service.example.closeJob(jobId, type, event);
return;
}
/**
* 创建任务池
*/