diff --git a/adaptor/PCM-HPC/PCM-TH/rpc/etc/hpcth.yaml b/adaptor/PCM-HPC/PCM-TH/rpc/etc/hpcth.yaml index ea8db24d..7e5ce6c8 100644 --- a/adaptor/PCM-HPC/PCM-TH/rpc/etc/hpcth.yaml +++ b/adaptor/PCM-HPC/PCM-TH/rpc/etc/hpcth.yaml @@ -2,7 +2,7 @@ NacosConfig: DataId: pcm-th-rpc.yaml Group: DEFAULT_GROUP ServerConfigs: - - IpAddr: 10.101.15.7 + - IpAddr: 119.45.100.73 Port: 8848 ClientConfig: NamespaceId: test diff --git a/adaptor/PCM-HPC/PCM-TH/rpc/hpcth.go b/adaptor/PCM-HPC/PCM-TH/rpc/hpcth.go index 74d0959a..d9cc1666 100644 --- a/adaptor/PCM-HPC/PCM-TH/rpc/hpcth.go +++ b/adaptor/PCM-HPC/PCM-TH/rpc/hpcth.go @@ -21,7 +21,6 @@ var configFile = flag.String("f", "adaptor/PCM-HPC/PCM-TH/rpc/etc/hpcth.yaml", " func main() { - //-------------------- flag.Parse() var bootstrapConfig commonConfig.BootstrapConfig diff --git a/adaptor/PCM-HPC/PCM-TH/rpc/internal/logic/cronlogic.go b/adaptor/PCM-HPC/PCM-TH/rpc/internal/logic/cronlogic.go index 678ce5e7..c966cb41 100644 --- a/adaptor/PCM-HPC/PCM-TH/rpc/internal/logic/cronlogic.go +++ b/adaptor/PCM-HPC/PCM-TH/rpc/internal/logic/cronlogic.go @@ -7,10 +7,12 @@ import ( "PCM/common/enum" "context" "github.com/zeromicro/go-zero/core/logx" + "strconv" "time" ) func InitCron(svc *svc.ServiceContext) { + svc.Cron.Start() submitJobLogic := NewSubmitJobLogic(context.Background(), svc) listLogic := NewListJobLogic(context.Background(), svc) svc.Cron.AddFunc("*/5 * * * * ?", func() { @@ -36,11 +38,10 @@ func InitCron(svc *svc.ServiceContext) { for index, _ := range infoList.HpcInfoList { for _, job := range listJob.Jobs { if job.Name == infoList.HpcInfoList[index].Name { - infoList.HpcInfoList[index].JobId = string(job.JobId) + infoList.HpcInfoList[index].JobId = strconv.Itoa(int(job.JobId)) infoList.HpcInfoList[index].StartTime = time.Unix(job.StartTime, 0).String() infoList.HpcInfoList[index].RunningTime = time.Now().Sub(time.Unix(job.StartTime, 0)).Milliseconds() infoList.HpcInfoList[index].Status = enum.State(job.JobState).String() - } } } @@ -63,7 +64,7 @@ func submitJob(infoList *pcmcoreclient.InfoListResp, submitJobLogic *SubmitJobLo } jobResult, _ := submitJobLogic.SubmitJob(&submitReq) infoList.HpcInfoList[index].Status = "Pending" - infoList.HpcInfoList[index].JobId = string(jobResult.SubmitResponseMsg[0].JobId) + infoList.HpcInfoList[index].JobId = strconv.Itoa(int(jobResult.SubmitResponseMsg[0].JobId)) } } }