22 lines
602 B
Go
22 lines
602 B
Go
package rtask
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
func (this *apiComp) RtestCheck(session comm.IUserSession, req *pb.RtaskTestReq) (code pb.ErrorCode) {
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) Rtest(session comm.IUserSession, req *pb.RtaskTestReq) (code pb.ErrorCode, data proto.Message) {
|
|
code = this.moduleRtask.SendToRtask(session, comm.TaskType(req.RtaskType), req.Params...)
|
|
|
|
if err := session.SendMsg(string(this.moduleRtask.GetType()), "rtasktest", &pb.RtaskTestResp{Flag: true}); err != nil {
|
|
code = pb.ErrorCode_SystemError
|
|
}
|
|
return
|
|
}
|