code restructure
This commit is contained in:
parent
b87c45f9f2
commit
7f8d9e89a2
|
|
@ -1,12 +1,11 @@
|
|||
package handler
|
||||
|
||||
import (
|
||||
"PCM/common/tool"
|
||||
"net/http"
|
||||
|
||||
"PCM/adaptor/gateway/api/internal/logic"
|
||||
"PCM/adaptor/gateway/api/internal/svc"
|
||||
"PCM/adaptor/gateway/api/internal/types"
|
||||
"PCM/adaptor/PCM-CORE/api/internal/logic"
|
||||
"PCM/adaptor/PCM-CORE/api/internal/svc"
|
||||
"PCM/adaptor/PCM-CORE/api/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
|
|
@ -17,10 +16,8 @@ func scheduleTaskHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
return
|
||||
}
|
||||
|
||||
l := logic.NewScheduleTaskLogic(r.Context(), svcCtx)
|
||||
// 解析yaml文件
|
||||
_, fileHeader, err := r.FormFile("file")
|
||||
err = tool.Yaml2struct(fileHeader, &req)
|
||||
resp, err := l.ScheduleTask(&req)
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
package svc
|
||||
|
||||
import "PCM/adaptor/slurm/slurmShuguang/rpc/internal/config"
|
||||
import (
|
||||
"PCM/adaptor/PCM-HPC/PCM-AC/rpc/internal/config"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
|
|
@ -1,18 +1,17 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"PCM/adaptor/PCM-HPC/PCM-HPC-CORE/api/internal/config"
|
||||
"PCM/adaptor/PCM-HPC/PCM-HPC-CORE/api/internal/handler"
|
||||
"PCM/adaptor/PCM-HPC/PCM-HPC-CORE/api/internal/svc"
|
||||
"flag"
|
||||
"fmt"
|
||||
|
||||
"PCM/adaptor/slurm/slurmCore/api/internal/config"
|
||||
"PCM/adaptor/slurm/slurmCore/api/internal/handler"
|
||||
"PCM/adaptor/slurm/slurmCore/api/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/conf"
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
var configFile = flag.String("f", "C:\\Users\\Administrator\\GolandProjects\\PCM\\adaptor\\slurm\\slurmCore\\api\\etc\\gateway-api.yaml", "the config file")
|
||||
var configFile = flag.String("f", "adaptor/PCM-HPC/PCM-HPC-CORE/api/etc/slurmcore-api.yaml", "the config file")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
package svc
|
||||
|
||||
import "PCM/adaptor/slurm/slurmTianhe/rpc/internal/config"
|
||||
import (
|
||||
"PCM/adaptor/PCM-HPC/PCM-TH/rpc/internal/config"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
Loading…
Reference in New Issue