var system=require("../../system")
var settings=require("../../../config/settings");
const CtlBase = require("../ctl.base");
const uuidv4 = require('uuid/v4');
class TaskCtl extends CtlBase{
   constructor(){
     super(CtlBase.getServiceName(TaskCtl));

   }
   async restartTasks(queryobj,qobj){
     var result=await this.service.restartTasks(qobj);
     return system.getResult2(result,null);
   }
   async restartTasks2(queryobj,qobj){
     var result=await this.service.restartTasks2(qobj);
     return system.getResult2(result,null);
   }
   async initNewInstance(queryobj,qobj){
     var u=uuidv4();
     var aid=u.replace(/\-/g,"");
     var rd={name:"",appid:aid}
     return system.getResult2(rd,null);
   }
   async makerpt(queryobj,qobj){
     var result=await this.service.makerpt(qobj);
     return system.getResult2(result,null);
   }
}
module.exports=TaskCtl;
